File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7373// pins used for the connection with the sensor
7474// the other you need are controlled by the SPI library):
7575// const int energy_IRQ = 2;
76- #ifdef ARDUINO_ESP8266_WEMOS_D1MINI // WeMos mini and D1 R2
76+ #if defined( ARDUINO_ESP8266_WEMOS_D1MINI) // WeMos mini and D1 R2
7777const int energy_CS = D8; // WEMOS SS pin
78- #endif
79-
80- #ifdef ARDUINO_ESP8266_ESP12 // Adafruit Huzzah
78+ #elif defined(ARDUINO_ESP8266_ESP12) // Adafruit Huzzah
8179const int energy_CS = 15 ; // HUZZAH SS pins ( 0 or 15)
82- #endif
83-
84- #ifdef ARDUINO_ARCH_SAMD // M0 board
80+ #elif defined(ARDUINO_ARCH_SAMD) // M0 board
8581const int energy_CS = 10 ; // M0 SS pin
86- #endif
87-
88- #ifdef __AVR_ATmega32U4__ // 32u4 board
82+ #elif defined(__AVR_ATmega32U4__) // 32u4 board
8983const int energy_CS = 10 ; // 32u4 SS pin
90- #endif
91-
92- #if !(defined ARDUINO_ESP8266_WEMOS_D1MINI || defined ARDUINO_ESP8266_ESP12 || defined ARDUINO_ARCH_SAMD || defined __AVR_ATmega32U4__)
84+ #else
9385const int energy_CS = SS; // Use default SS pin for unknown Arduino
94- #endif
86+ #endif // defined(ARDUINO_ESP8266_WEMOS_D1MINI)
9587
9688class ATM90E26_SPI
9789{
You can’t perform that action at this time.
0 commit comments