Search found 3362 matches

by pythoncoder
Thu Apr 25, 2019 8:01 am
Forum: MicroPython pyboard
Topic: Debug code with pyCharm
Replies: 2
Views: 146

Re: Debug code with pyCharm

MicroPython does not have a debugger. Pure Python code can be debugged on a PC under CPython before running it under MicroPython. Where this is impractical (e.g. you're running on a Pyboard) debug it the old skool way with print statements and/or logging.
by pythoncoder
Thu Apr 25, 2019 7:36 am
Forum: ESP8266 boards
Topic: Gyro/Mpu_Calibration "ESP8266"
Replies: 22
Views: 717

Re: Gyro/Mpu_Calibration "ESP8266"

... @pythoncoder , I appreciated your help , I will wait your update I think you misunderstand me. I don't intend to remove that line from the GitHub archive: its purpose is to detect fake chips. I'm suggesting that you comment it out in your local copy of imu.py to see if your hardware works in ot...
by pythoncoder
Wed Apr 24, 2019 9:08 am
Forum: ESP8266 boards
Topic: Gyro/Mpu_Calibration "ESP8266"
Replies: 22
Views: 717

Re: Gyro/Mpu_Calibration "ESP8266"

I don't believe the chip they are using is genuine. The purpose of line 105 is to check for a genuine MPU6050 device and it is failing. I'd comment it out and see if you get plausible results but there are no guarantees with Chinese clone chips.
by pythoncoder
Wed Apr 24, 2019 8:59 am
Forum: General Discussion and Questions
Topic: square signal for buzzer
Replies: 7
Views: 143

Re: square signal for buzzer

@vchaps You're right: lacking a timer you could measure the latency and take it into account. Something along these lines: from utime import ticks_us, ticks_diff toggle = lambda : pin0.write_digital(not pin0.read_digital()) t = ticks_us() toggle() latency = ticks_diff(ticks_us(), t) delta = 1136 - l...
by pythoncoder
Wed Apr 24, 2019 8:30 am
Forum: ESP32 boards
Topic: Waveshare e-paper display how to rotate?
Replies: 13
Views: 769

Re: Waveshare e-paper display how to rotate?

One possible solution is this. Note this is straight off the top of my head and it may be nonsense. You could create two framebuf instances, one in portrait mode and the other in landscape mode. Use the framebuf method to draw to the portrait mode buffer. When you want to render it, use the blit met...
by pythoncoder
Wed Apr 24, 2019 8:19 am
Forum: Pyboard D-series
Topic: Pyboard D-series accelerometer-gyro ?
Replies: 2
Views: 110

Re: Pyboard D-series accelerometer-gyro ?

The D-series is superb. I would suggest an MPU-9250 such as this one : the MPU6050 is long obsolete and has been replaced by the MPU-9250. Some of the MPU-6050 devices seem to be questionable Chinese clones. We have drivers for genuine Invensense/TDK MPU-6050, MPU-9150 and MPU-9250 devices here . Th...
by pythoncoder
Wed Apr 24, 2019 8:09 am
Forum: ESP32 boards
Topic: Stability of ESP32 vs ESP8266
Replies: 8
Views: 1159

Re: Stability of ESP32 vs ESP8266

@GryKyo Sorry for the delayed response - I was largely off-grid when you posted. Evidently the contactor is producing a burst of RFI. Your chances of reducing it at source are probably limited as the RFI is probably being radiated by the wiring to and from the contactor. I can imagine that shielding...
by pythoncoder
Wed Apr 24, 2019 7:16 am
Forum: ESP8266 boards
Topic: Gyro/Mpu_Calibration "ESP8266"
Replies: 22
Views: 717

Re: Gyro/Mpu_Calibration "ESP8266"

@samerou The "bad chip ID" indicates that your chip is not a genuine InvenSense MPU-6050. This chip has been obsolete for a long time: even the MPU-9150 is obsolete with only the MPU-9250 currently manufactured. So I would question exactly what hardware you are using. This may be affecting your othe...
by pythoncoder
Tue Apr 23, 2019 5:40 pm
Forum: Other Boards
Topic: The 'machine' module on Raspberry Pi
Replies: 6
Views: 250

Re: The 'machine' module on Raspberry Pi

As I understand it buildroot has the option of installing a Linux kernel, filesystem and bootloader. If you plan to use it in that mode I'd try the official Unix build. However this does not support machine . Otherwise I guess you'll need to skip the Linux OS options and build one of the baremetal p...
by pythoncoder
Tue Apr 23, 2019 5:29 pm
Forum: General Discussion and Questions
Topic: square signal for buzzer
Replies: 7
Views: 143

Re: square signal for buzzer

Indeed. If I were presenting the topic I'd illustrate the C code, straight Python as per your sample, and timer-driven Python to illustrate a way to achieve high frequency precision. In the latter solution any latency in issuing the callback is cancelled out because it is the same for each output tr...