pintert3 / lc-sensor-evaluation-board

Low-Cost 18-sensor Wireless Sensor Device Code
MIT License
0 stars 0 forks source link

DSD321 external RTC clock library not compatible with Nano Every #60

Open pintert3 opened 2 years ago

pintert3 commented 2 years ago

The DSD321 library is not compatible with the Atmega4809. It has a lot of variables used that aren't recognised. Full log:

WARNING: library Nova_Fitness_Sds_dust_sensors_library claims to run on avr, esp8266, esp32, sam, samd architecture(s) and may be incompatible with your current board which runs on megaavr architecture(s).
In file included from /home/pintert3/Arduino/libraries/Adafruit_BusIO/Adafruit_I2CDevice.h:5:0,
                 from /home/pintert3/Arduino/libraries/Adafruit_BusIO/Adafruit_I2CDevice.cpp:1:
/home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/libraries/Wire/src/Wire.h: In member function 'bool Adafruit_I2CDevice::_read(uint8_t*, size_t, bool)':
/home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/libraries/Wire/src/Wire.h:64:12: note: candidate 1: size_t TwoWire::requestFrom(int, int, int)
     size_t requestFrom(int, int, int);
            ^~~~~~~~~~~
/home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/libraries/Wire/src/Wire.h:62:12: note: candidate 2: virtual size_t TwoWire::requestFrom(uint8_t, size_t, bool)
     size_t requestFrom(uint8_t, size_t, bool);
            ^~~~~~~~~~~
In file included from /home/pintert3/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/avr/include/avr/io.h:99:0,
                 from /home/pintert3/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/avr/include/avr/pgmspace.h:90,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/api/String.h:31,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/api/IPAddress.h:24,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/api/ArduinoAPI.h:30,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/Arduino.h:23,
                 from /home/pintert3/Arduino/libraries/DS3231/DS3231.h:26,
                 from /home/pintert3/Arduino/libraries/DS3231/DS3231.cpp:22:
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h: In member function 'void DS3231::begin()':
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:12:7: error: 'TWSR' was not declared in this scope
   cbi(TWSR, TWPS0);
       ^
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:12:3: note: in expansion of macro 'cbi'
   cbi(TWSR, TWPS0);
   ^~~
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:12:7: note: suggested alternative: 'TWI0'
   cbi(TWSR, TWPS0);
       ^
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:12:3: note: in expansion of macro 'cbi'
   cbi(TWSR, TWPS0);
   ^~~
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:12:13: error: 'TWPS0' was not declared in this scope
   cbi(TWSR, TWPS0);
             ^
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:12:3: note: in expansion of macro 'cbi'
   cbi(TWSR, TWPS0);
   ^~~
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:12:13: note: suggested alternative: 'TWI0'
   cbi(TWSR, TWPS0);
             ^
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:12:3: note: in expansion of macro 'cbi'
   cbi(TWSR, TWPS0);
   ^~~
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:13:13: error: 'TWPS1' was not declared in this scope
   cbi(TWSR, TWPS1);
             ^
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:13:3: note: in expansion of macro 'cbi'
   cbi(TWSR, TWPS1);
   ^~~
In file included from /home/pintert3/Arduino/libraries/DS3231/DS3231.cpp:26:0:
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:14:3: error: 'TWBR' was not declared in this scope
   TWBR = ((F_CPU / TWI_FREQ) - 16) / 2;
   ^~~~
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:14:3: note: suggested alternative: 'TWI0'
   TWBR = ((F_CPU / TWI_FREQ) - 16) / 2;
   ^~~~
   TWI0
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:17:3: error: 'TWCR' was not declared in this scope
   TWCR = _BV(TWEN) | _BV(TWIE)/* | _BV(TWEA)*/;
   ^~~~
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:17:3: note: suggested alternative: 'TWI0'
   TWCR = _BV(TWEN) | _BV(TWIE)/* | _BV(TWEA)*/;
   ^~~~
   TWI0
In file included from /home/pintert3/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/avr/include/avr/io.h:99:0,
                 from /home/pintert3/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/avr/include/avr/pgmspace.h:90,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/api/String.h:31,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/api/IPAddress.h:24,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/api/ArduinoAPI.h:30,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/Arduino.h:23,
                 from /home/pintert3/Arduino/libraries/DS3231/DS3231.h:26,
                 from /home/pintert3/Arduino/libraries/DS3231/DS3231.cpp:22:
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:17:14: error: 'TWEN' was not declared in this scope
   TWCR = _BV(TWEN) | _BV(TWIE)/* | _BV(TWEA)*/;
              ^
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:17:14: note: suggested alternative: 'TWI0'
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:17:26: error: 'TWIE' was not declared in this scope
   TWCR = _BV(TWEN) | _BV(TWIE)/* | _BV(TWEA)*/;
                          ^
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:17:26: note: suggested alternative: 'TWI0'
In file included from /home/pintert3/Arduino/libraries/DS3231/DS3231.cpp:26:0:
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h: In member function 'void DS3231::_burstRead()':
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:31:3: error: 'TWCR' was not declared in this scope
   TWCR = _BV(TWEN) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTA);      // Send START
   ^~~~
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:31:3: note: suggested alternative: 'TWI0'
   TWCR = _BV(TWEN) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTA);      // Send START
   ^~~~
   TWI0
In file included from /home/pintert3/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/avr/include/avr/io.h:99:0,
                 from /home/pintert3/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/avr/include/avr/pgmspace.h:90,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/api/String.h:31,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/api/IPAddress.h:24,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/api/ArduinoAPI.h:30,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/Arduino.h:23,
                 from /home/pintert3/Arduino/libraries/DS3231/DS3231.h:26,
                 from /home/pintert3/Arduino/libraries/DS3231/DS3231.cpp:22:
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:31:14: error: 'TWEN' was not declared in this scope
   TWCR = _BV(TWEN) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTA);      // Send START
              ^
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:31:14: note: suggested alternative: 'TWI0'
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:31:26: error: 'TWEA' was not declared in this scope
   TWCR = _BV(TWEN) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTA);      // Send START
                          ^
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:31:26: note: suggested alternative: 'TWI0'
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:31:38: error: 'TWINT' was not declared in this scope
   TWCR = _BV(TWEN) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTA);      // Send START
                                      ^
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:31:38: note: suggested alternative: 'TWI_t'
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:31:51: error: 'TWSTA' was not declared in this scope
   TWCR = _BV(TWEN) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTA);      // Send START
                                                   ^
In file included from /home/pintert3/Arduino/libraries/DS3231/DS3231.cpp:26:0:
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:33:3: error: 'TWDR' was not declared in this scope
   TWDR = DS3231_ADDR_W;
   ^~~~
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:33:3: note: suggested alternative: 'TWI0'
   TWDR = DS3231_ADDR_W;
   ^~~~
   TWI0
In file included from /home/pintert3/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/avr/include/avr/io.h:99:0,
                 from /home/pintert3/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/avr/include/avr/pgmspace.h:90,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/api/String.h:31,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/api/IPAddress.h:24,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/api/ArduinoAPI.h:30,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/Arduino.h:23,
                 from /home/pintert3/Arduino/libraries/DS3231/DS3231.h:26,
                 from /home/pintert3/Arduino/libraries/DS3231/DS3231.cpp:22:
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:55:38: error: 'TWSTO' was not declared in this scope
   TWCR = _BV(TWEN)| _BV(TWINT) | _BV(TWSTO);         // Send STOP
                                      ^
In file included from /home/pintert3/Arduino/libraries/DS3231/DS3231.cpp:26:0:
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h: In member function 'uint8_t DS3231::_readRegister(uint8_t)':
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:85:3: error: 'TWCR' was not declared in this scope
   TWCR = _BV(TWEN) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTA);      // Send START
   ^~~~
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:85:3: note: suggested alternative: 'TWI0'
   TWCR = _BV(TWEN) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTA);      // Send START
   ^~~~
   TWI0
In file included from /home/pintert3/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/avr/include/avr/io.h:99:0,
                 from /home/pintert3/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/avr/include/avr/pgmspace.h:90,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/api/String.h:31,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/api/IPAddress.h:24,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/api/ArduinoAPI.h:30,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/Arduino.h:23,
                 from /home/pintert3/Arduino/libraries/DS3231/DS3231.h:26,
                 from /home/pintert3/Arduino/libraries/DS3231/DS3231.cpp:22:
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:85:14: error: 'TWEN' was not declared in this scope
   TWCR = _BV(TWEN) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTA);      // Send START
              ^
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:85:14: note: suggested alternative: 'TWI0'
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:85:26: error: 'TWEA' was not declared in this scope
   TWCR = _BV(TWEN) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTA);      // Send START
                          ^
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:85:26: note: suggested alternative: 'TWI0'
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:85:38: error: 'TWINT' was not declared in this scope
   TWCR = _BV(TWEN) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTA);      // Send START
                                      ^
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:85:38: note: suggested alternative: 'TWI_t'
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:85:51: error: 'TWSTA' was not declared in this scope
   TWCR = _BV(TWEN) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTA);      // Send START
                                                   ^
In file included from /home/pintert3/Arduino/libraries/DS3231/DS3231.cpp:26:0:
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:87:3: error: 'TWDR' was not declared in this scope
   TWDR = DS3231_ADDR_W;
   ^~~~
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:87:3: note: suggested alternative: 'TWI0'
   TWDR = DS3231_ADDR_W;
   ^~~~
   TWI0
In file included from /home/pintert3/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/avr/include/avr/io.h:99:0,
                 from /home/pintert3/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/avr/include/avr/pgmspace.h:90,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/api/String.h:31,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/api/IPAddress.h:24,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/api/ArduinoAPI.h:30,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/Arduino.h:23,
                 from /home/pintert3/Arduino/libraries/DS3231/DS3231.h:26,
                 from /home/pintert3/Arduino/libraries/DS3231/DS3231.cpp:22:
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:106:38: error: 'TWSTO' was not declared in this scope
   TWCR = _BV(TWEN)| _BV(TWINT) | _BV(TWSTO);         // Send STOP
                                      ^
In file included from /home/pintert3/Arduino/libraries/DS3231/DS3231.cpp:26:0:
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h: In member function 'void DS3231::_writeRegister(uint8_t, uint8_t)':
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:128:3: error: 'TWCR' was not declared in this scope
   TWCR = _BV(TWEN) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTA);      // Send START
   ^~~~
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:128:3: note: suggested alternative: 'TWI0'
   TWCR = _BV(TWEN) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTA);      // Send START
   ^~~~
   TWI0
In file included from /home/pintert3/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/avr/include/avr/io.h:99:0,
                 from /home/pintert3/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/avr/include/avr/pgmspace.h:90,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/api/String.h:31,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/api/IPAddress.h:24,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/api/ArduinoAPI.h:30,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/Arduino.h:23,
                 from /home/pintert3/Arduino/libraries/DS3231/DS3231.h:26,
                 from /home/pintert3/Arduino/libraries/DS3231/DS3231.cpp:22:
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:128:14: error: 'TWEN' was not declared in this scope
   TWCR = _BV(TWEN) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTA);      // Send START
              ^
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:128:14: note: suggested alternative: 'TWI0'
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:128:26: error: 'TWEA' was not declared in this scope
   TWCR = _BV(TWEN) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTA);      // Send START
                          ^
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:128:26: note: suggested alternative: 'TWI0'
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:128:38: error: 'TWINT' was not declared in this scope
   TWCR = _BV(TWEN) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTA);      // Send START
                                      ^
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:128:38: note: suggested alternative: 'TWI_t'
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:128:51: error: 'TWSTA' was not declared in this scope
   TWCR = _BV(TWEN) | _BV(TWEA) | _BV(TWINT) | _BV(TWSTA);      // Send START
                                                   ^
In file included from /home/pintert3/Arduino/libraries/DS3231/DS3231.cpp:26:0:
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:130:3: error: 'TWDR' was not declared in this scope
   TWDR = DS3231_ADDR_W;
   ^~~~
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:130:3: note: suggested alternative: 'TWI0'
   TWDR = DS3231_ADDR_W;
   ^~~~
   TWI0
In file included from /home/pintert3/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/avr/include/avr/io.h:99:0,
                 from /home/pintert3/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/avr/include/avr/pgmspace.h:90,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/api/String.h:31,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/api/IPAddress.h:24,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/api/ArduinoAPI.h:30,
                 from /home/pintert3/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/Arduino.h:23,
                 from /home/pintert3/Arduino/libraries/DS3231/DS3231.h:26,
                 from /home/pintert3/Arduino/libraries/DS3231/DS3231.cpp:22:
/home/pintert3/Arduino/libraries/DS3231/hardware/avr/HW_AVR.h:140:38: error: 'TWSTO' was not declared in this scope
   TWCR = _BV(TWEN)| _BV(TWINT) | _BV(TWSTO);         // Send STOP
                                      ^
pintert3 commented 2 years ago

It's particularly related to the TWI.

pintert3 commented 2 years ago

I'm starting to consider simply building it based on the Arduino Nano first.

pintert3 commented 2 years ago

Might have to try the official DS3231 library. According to Arduino:

This library is compatible with all architectures so you should be able to use it on all the Arduino boards.

mpiima1 commented 2 years ago

Someone must have used that rtc with an every

pintert3 commented 2 years ago

Not with that library. That library is from 2014. The Nano Every is newer than that. The more official lib for DS3231 is up to date, last update being 2021

pintert3 commented 2 years ago

Done, not yet tested, but NorthernWidget's library compiles.