This repository has been archived by the owner on Jun 22, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
DisplayReadings.ino
Arnd edited this page Jun 22, 2018
·
2 revisions
Arduino sketch to demonstrate making current and voltage measurements with the INA226 chip.
The code contains no processor specific conditional code apart from the interrupt mechanism described below and therefore should work on all Atmel Arduinos. It was designed and tested on both Arduino Micro and Arduino Mega boards.
The INA226 is initialized in the setup() method for a ±1 Amps maximum current and for a 0.1Ω resistor. Continuous reading mode is set and main loop displays the last measurements computed by the INA226 to the serial port every 5 seconds in an endless loop.