Search found 3666 matches

by pythoncoder
Thu Nov 21, 2019 1:46 pm
Forum: Drivers for External Components
Topic: NEC Infrared receiver class
Replies: 9
Views: 5202

Re: NEC Infrared receiver class

Mine is just a receiver.

A TX is some way down my long TODO list. Please don't hold your breath waiting...
by pythoncoder
Thu Nov 21, 2019 1:41 pm
Forum: General Discussion and Questions
Topic: loop speed compared to Arduino...
Replies: 3
Views: 83

Re: loop speed compared to Arduino...

For high performance applications I would recommend the Pyboard D. WiFi is offloaded to a separate chip so does not impact the CPU speed and is supremely reliable. MicroPython itself runs on "bare metal" and is fast. By contrast the ESP32 runs an underlying OS and is therefore slower. But it is the ...
by pythoncoder
Wed Nov 20, 2019 5:19 pm
Forum: MicroPython pyboard
Topic: Use of timers
Replies: 5
Views: 101

Re: Use of timers

It might be simplest not to use a timer: I'm not sure if there's a way to get a timer to emit an exact number of pulses. import pyb from time import ticks_us, ticks_diff def rats(): t = ticks_us() for _ in range(700): p(1) p(0) print(ticks_diff(ticks_us(), t)) executes in 6.8ms. If your stepper moto...
by pythoncoder
Wed Nov 20, 2019 9:13 am
Forum: ESP32 boards
Topic: persistent wifi/mqtt connections or not
Replies: 9
Views: 726

Re: persistent wifi/mqtt connections or not

The rating of the wall wart tells you little. The problem is reliability. You can charge a cellphone battery even if the PSU has occasional glitches, perhaps caused by electrical noise on the mains. Hardware devices will crash. I find wall warts designed for continuous running are best - e.g. the on...
by pythoncoder
Wed Nov 20, 2019 9:07 am
Forum: Hardware Projects
Topic: Larger fonts on SSD1306 OLED displays
Replies: 16
Views: 8153

Re: Larger fonts on SSD1306 OLED displays

The file freesans20.py is Python sourcecode created using the font_to_py utility. It is up to you to incorporate such files as frozen bytecode in your project. If you just put the file in the filesystem and import it, it will use lots of RAM. As frozen bytecode, when you import it, it will use very ...
by pythoncoder
Wed Nov 20, 2019 9:02 am
Forum: General Discussion and Questions
Topic: esp32 service routine 20ms with gc not possible?
Replies: 6
Views: 982

Re: esp32 service routine 20ms with gc not possible?

That is a very interesting observation, and a reason to avoid SPIRAM for some applications.
by pythoncoder
Wed Nov 20, 2019 9:00 am
Forum: ESP8266 boards
Topic: Cant get REPL on ESP8285
Replies: 5
Views: 825

Re: Cant get REPL on ESP8285

Have you used the --verify option on esptool? I have programmed ESP8285's with the following: esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash --verify --flash_size=detect -fm dout 0 build/firmware-combined.bin but other (older?) chips required esptool.py --port /dev/ttyUSB0 --baud 115200 wr...
by pythoncoder
Tue Nov 19, 2019 8:06 am
Forum: ESP32 boards
Topic: persistent wifi/mqtt connections or not
Replies: 9
Views: 726

Re: persistent wifi/mqtt connections or not

Are you sure your source of power is reliable? Some USB wall warts are OK for charging cellphones but crap for running hardware.
by pythoncoder
Tue Nov 19, 2019 8:03 am
Forum: Hardware Projects
Topic: Larger fonts on SSD1306 OLED displays
Replies: 16
Views: 8153

Re: Larger fonts on SSD1306 OLED displays

You need to implement fonts as frozen bytecode to conserve RAM. That is the reason for converting them to Python source: see font-to-py repo.
by pythoncoder
Mon Nov 18, 2019 6:24 am
Forum: Programs, Libraries and Tools
Topic: New uasyncio version
Replies: 5
Views: 586

It's getting simpler

I think (u)asyncio has become steadily simpler to use. The history of asyncio is not pretty. It confused the hell out of me and I've been writing asynchronous code for nearly 40 years. One motive behind the tutorial was to suggest a programming style which ignored old redundant features. I will upda...