flav1972 / ArduinoINA219

An Arduino library for the INA219 I2C current monitor
17 stars 16 forks source link

error compilation with ARDUINO MEGA 2560 #10

Closed rems78 closed 4 years ago

rems78 commented 5 years ago

Hi, With IDE arduino, select Mega 2560 as board . Compilation error : Arduino : 1.8.9 (Windows 10), Carte : "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

D:\ArduinoINA219-master\INA219.cpp:51:15: error: expected unqualified-id before numeric constant const uint8_t PG1 = 12; ^ D:\ArduinoINA219-master\INA219.cpp:52:15: error: expected unqualified-id before numeric constant const uint8_t PG0 = 11; ^ Utilisation de la bibliothèque Wire version 1.0 dans le dossier: D:\prog\arduino-1.8.9\hardware\arduino\avr\libraries\Wire exit status 1 Erreur de compilation pour la carte Arduino/Genuino Mega or Mega 2560

error solved renaming PG1 and PG2. Effetc? Regards

flav1972 commented 4 years ago

Hello,

I do not have a Mega to try it.

Regards, Flav

flav1972 commented 4 years ago

Merged the pull request in master. v1.0.4