DFRobot digital i2c wattmeter

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.

1 Like

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 :+1: :stuck_out_tongue_winking_eye:
https://go.particle.io/shared_apps/606b306bde63ee0017f5aab7
Please note is not tested :see_no_evil:

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: - system.reset()