Search found 55 matches

by fstengel
Wed Mar 04, 2020 12:56 pm
Forum: ESP32 boards
Topic: ESP32 network activation resets the board
Replies: 5
Views: 3107

Re: ESP32 network activation resets the board

This could almost become part of a FAQ. There are quite a few questions in the forum on the same issue (amonst them one of mine :oops:)
by fstengel
Wed Mar 04, 2020 12:53 pm
Forum: General Discussion and Questions
Topic: ubluetooth - async ? 'BLE' object isn't iterable
Replies: 22
Views: 9896

Re: ubluetooth - async ? 'BLE' object isn't iterable

Diclaimer: I'm not an uasyncio specialist. However, a couple of things look weird in your code. You want to use the singleton BLE object, you do not need to wait for it: it does already exist. So no need for await in the line initializing ble . This is why your coro does not work: you try to wait fo...
by fstengel
Sun Mar 01, 2020 9:21 am
Forum: ESP32 boards
Topic: BLE Active Exception problem
Replies: 3
Views: 2688

Re: BLE Active Exception problem

As far as I can tell, the exception is not thrown by MicroPython, but by the part that is used by VS and its plugin to communicate with your ESP32. One possible reason for your issue is your chip resetting because of a brownout due to the RF part of the chip being activated. I had that problem with ...
by fstengel
Fri Feb 14, 2020 8:36 am
Forum: General Discussion and Questions
Topic: How to combine bytearrays fast ?
Replies: 14
Views: 6911

Re: How to combine bytearrays fast ?

I just tried using the viper emitter on my ESP32. It seems that range(240) is strongly optimized. The following three functions @micropython.viper def merge3(a:ptr8, b:ptr8, c:ptr8, d:ptr8, result:ptr8)->ptr8: iteration_list = range(0,240) for i in iteration_list: j = int(i) result[j] = a[j] + b[j] ...
by fstengel
Tue Feb 11, 2020 9:45 am
Forum: ESP32 boards
Topic: unable to include .h files from ESP-IDF components directory
Replies: 2
Views: 3884

Re: unable to include .h files from ESP-IDF components directory

Just an idea, have you tried the following snippet: #include esp_adc_cal/esp_adc_cal.h This mirrors what happens for rmt: one includes driver/rmt.h which actually includes the file found at component/driver/include/rmt.h in the esp-idf folder. I cannot test this at the moment, so this is just an ide...
by fstengel
Wed Feb 05, 2020 2:35 pm
Forum: General Discussion and Questions
Topic: local variable referenced before assignment
Replies: 9
Views: 8334

Re: local variable referenced before assignment

Another way to globally access data without having to resort to local/global is by using objects. class AnObject: def __init__(self): self.data = 0 def set(self, o): self.data = o def get(self): return self.data ob = AnObject() def test1(): ob.set(32) def test2(): if ob.get()==32: print("Test 1 done...
by fstengel
Mon Feb 03, 2020 1:15 pm
Forum: ESP32 boards
Topic: M5Atom
Replies: 11
Views: 6714

Re: M5Atom

That reminds me: why does one brown out (matrix) and not the other (lite)? Is it because there is an IMU added?
by fstengel
Mon Feb 03, 2020 1:11 pm
Forum: ESP32 boards
Topic: M5Atom
Replies: 11
Views: 6714

Re: M5Atom

Something else to check first - when the radio is active the ESP32 draws the most amount of current. It can sometimes spike to above 500mA and can reset if the power supply is inadequate. So perhaps quickly try a different USB power source and possibly even cable... Shame on me :oops:. It was the c...
by fstengel
Mon Feb 03, 2020 7:09 am
Forum: ESP32 boards
Topic: M5Atom
Replies: 11
Views: 6714

Re: M5Atom

Well, this is as I feared: I must have a faulty board. I tried with older versions (1.10 an 1.10) and got the same sequence: reboot when activating the RF part. >>> wlan.active(True) W (41515) phy_init: failed to load RF calibration data (0x1102), falling back to full calibration ets Jun 8 2016 00:2...
by fstengel
Sun Feb 02, 2020 8:50 pm
Forum: ESP32 boards
Topic: M5Atom
Replies: 11
Views: 6714

M5Atom

I just bought two M5Atoms: a lite and a matrix. I flashed both with the latest binary. In my case esp32-idf3-20200130-v1.12-98-gb72cb0ca1. I can access both, play around with micropython. However, there is something weird: I can use the network (Wifi or Bluetooth) on the lite, but as soon as I try t...