I’m going to write this here for later versions of me to refer back to.
Using a WeMos mini D clone – how to get it working with micropython.
Flashing the thing is fairly straight forward using esptool – just remember that the tool is case sensitive – so – this means that you need to write COM4 rather than com4.
What else? THONNY is kinda useful as a simple ide.
My soldering is shitty.
Check the address of the i2c device. i2c.scan() returns a decimal – you need to convert it to hex. In my case I was getting errors like this:
Traceback (most recent call last):
File “”, line 2, in
File “BME280.py”, line 153, in init
File “BME280.py”, line 159, in _load_calibration
File “BME280.py”, line 119, in readU16LE
File “BME280.py”, line 102, in readU16
OSError: [Errno 19] ENODEV
Kinda strange – indicates no device being detected. At first I thought it wasn’t soldered correctly. Then maybe pins were wrong but no….
The default address in the BME280.py file was 0x76. I needed 0x77.So I changed it in the library then finally found out that it doesn’t update the lib on the device. I will remember for next time.
What is good though is that because I could get a stack trace for the error – I could go into the lib and call the I2C stuff at low level – that was how I found out about the device was actually working and wired correctly, it just needed the correct address.
So – part 1 of many just works. Happy:)
You must be logged in to post a comment.