Hi, has anyone successfully used this wattmeter on an Electron ? would you have an example of the code you used?
Maybe you can adapt the Arduino library to use with an Electron.
IMHO you don’t need to adapt/port anything from Arduino for DFRobot/GRAVITY INA219 as the library for adafruit INA219 is already here:
and can be easly used
And here is an example with power of Particle variable, publish and function
Please note is not tested
you can use the function as:
- setpb:on - set publish on (default is off)
- setpb:off - set publish off
- pbinterv: 2000 - set publish interval to 2s (base is 10s)
- reset: -