micropython Library for atm90e32
TODO: I did not implement all the mehods/properties that are in the Arduino port. I am hoping through Open Source that someone (you?) would like to add more.
Thanks to Those That Went Before
There is so much prior work that made it easier to write a CP library for the atm90e32. Efforts include:
- Circuit Setup's Split Single Phase Energy Meter. I am delighted that John is providing us with this open source energy monitor! It makes it easy to figure out how much electricity is being used. Thank you John. Thank you for helping me get started with your product.
- Tisham Dhar's atm90e26 Arduino library. Tisham deserves a HUGE THANK YOU for his open source atm90e* hw and sw design. Tisham's excellent work and friendly help are inspirational.
- The atm90e26 Circuit Python library I wrote
- Circuit Setup's atm90e32 Arduino library
Installing micropython on the wemos
I used a wemos D1.
From the Command Line
The micropython docs have a tutorial on getting micropython onto the esp8266. We used what is currently the latest
Following the install instructions,
- erase the flash:
esptool.py --port /dev/tty.wchusbserial1410 erase_flash
- Copy micropython:
esptool.py --port /dev/tty.wchusbserial1410 --baud 460800 write_flash --flash_size=detect 0 esp8266-20190125-v1.11.bin
I started using uPyCraft. It is super easy to install micropython from the uPyCraft IDE.
The difference between the Circuit Python and micropython libraries is captured in the
_spi_rw methods of atm90e32_u.py.