I learned how to send data over UART to ESPHome. I will use this to send battery info from the power bank to the LED controller module, so it could be displayed in Home Assistant.
How will it work?
First the ATmega328P in the power bank will put all the values that will be sent into a single string. The string will look like this:
bat:xx|current:xx|voltage:xx|usb_current:xx
Then when the module receives it, ESPHome will run a lambda that splits the received string into separate strings for each value. They will then be converted into floats and sent to the corresponding sensor component.
For testing, I used a XIAO ESP32-C3 to send dummy data to a revision 1 LED controller PCB.
Next, I will work on module detection or the OLED interface for the power bank.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.