Search found 33 matches

by karfas
Sat Jun 19, 2021 1:19 pm
Forum: General Discussion and Questions
Topic: How to process i2c information
Replies: 1
Views: 154

Re: How to process i2c information

i2c.readfrom(104, 0x06) this command should give me the battery level. Are you sure your i2c bus is working well ? According to one of the arduino drivers, the i2c address of a MAX17055 is 0x36 (this is NOT 104 decimal), see https://github.com/AwotG/Arduino-MAX17055_Driver/blob/master/Arduino-MAX17...
by karfas
Wed Jun 16, 2021 8:15 pm
Forum: General Discussion and Questions
Topic: Saving data on ramdisk before a WDT event
Replies: 4
Views: 281

Re: Saving data on ramdisk before a WDT event

You might be able to save something in the RTC slow memory, e.g. machine.RTC().memory(). This will most likely not survive the reboot caused by the watchdog (as the memory attributes are wrong in current micropython), but it CAN be used to remember (small, up to 2048 bytes) things. One of my PRs - h...
by karfas
Fri Jun 11, 2021 8:39 pm
Forum: General Discussion and Questions
Topic: Pin.irq: Handlers for each Trigger
Replies: 3
Views: 207

Re: Pin.irq: Handlers for each Trigger

Micropython knows what trigger leads to triggering the callback. Micropython MAY know what triigger leads to triggering the callback, This will be MCU dependent. For example, on the STM32, if you ask to trigger on rising or falling edges, there is no way to know which edge actually triggered the IR...
by karfas
Tue Jun 01, 2021 3:44 pm
Forum: ESP8266 boards
Topic: How to disable all REPL
Replies: 10
Views: 4322

Re: How to disable all REPL

To disable REPL could you not just set TXD0 to an input? Will most likely not work in all thinkable cases. When his program sets TXDO, it may happen that a) someone connected serial might hit ^C before the output is set b) the REPL might initialize communication, and might therefore set TXD0 as it ...
by karfas
Tue May 25, 2021 7:45 am
Forum: ESP32 boards
Topic: esp32 not responsing
Replies: 9
Views: 1318

Re: esp32 not responsing

Try setting a lower baudrate. I experienced similar effects (maybe caused by faulty/too long USB cables). I don't remember the default speeds for the various tools, but my build script defines export ESPTOOL_BAUD=115200 # esptool.py export AMPY_BAUD=$ESPTOOL_BAUD # ampy export BAUD=$ESPTOOL_BAUD # m...
by karfas
Mon May 24, 2021 1:47 pm
Forum: ESP8266 boards
Topic: ESP01: power I2C sensor from board instead of battery
Replies: 2
Views: 1333

Re: ESP01: power I2C sensor from board instead of battery

However, I could only get this setup to work for 2 days, then the battery was depleted (I checked its voltage with a multimeter, it was around 2.6V). My knowledge in electronics is pretty limited, but I suspect my wiring isn't correct: the sensor is powered from the battery directly and is ON all t...
by karfas
Wed May 19, 2021 6:54 am
Forum: Announcements and News
Topic: Google Season of Docs 2021: Welcome Niti
Replies: 2
Views: 1156

Re: Google Season of Docs 2021: Welcome Niti

Maybe someone should allow GitHub actions for him. In https://github.com/micropython/micropython/pull/7239 is a statement reading
first-time contributors need a maintainer to approve running workflows. Learn more.
by karfas
Tue May 18, 2021 8:04 pm
Forum: ESP32 boards
Topic: [SOLVED] lightsleep() causes WiFi failure
Replies: 6
Views: 1313

Re: [SOLVED] lightsleep() causes WiFi failure

All in the post above:
Before entering deep sleep or light sleep modes, applications must disable WiFi and BT using appropriate calls (... esp_wifi_stop()
Leaving Wifi enabled will also most likely leave the receiver/transmitter on, so minimizing the effect of light sleep.
by karfas
Mon May 17, 2021 7:13 pm
Forum: ESP32 boards
Topic: [SOLVED] lightsleep() causes WiFi failure
Replies: 6
Views: 1313

Re: lightsleep() causes WiFi failure

OK, tried this with a modified version of your code (my micropython has no "uping" out of the box). The following works for me: from time import sleep_ms import network from config import ssid, password wlan = network.WLAN(network.STA_IF) wlan.active(True) wlan.connect(ssid, password) while not wlan...
by karfas
Mon May 17, 2021 2:43 pm
Forum: ESP32 boards
Topic: [SOLVED] lightsleep() causes WiFi failure
Replies: 6
Views: 1313

Re: lightsleep() causes WiFi failure

No idea about the messages in your second posts. A quick google search "esp32 light sleep wifi" brings me to https://www.esp32.com/viewtopic.php?t=15888 and from there to https://docs.espressif.com/projects/esp-idf/en/v4.0.1/api-reference/system/sleep_modes.html#wifi-bt-and-sleep-modes . There I fin...