JanStegenga / Arduino-STS-lib

Arduino library for reading Sensirion STS3x sensors.
GNU General Public License v3.0
4 stars 1 forks source link

readSTS.ino doesn't compile #1

Open damianb50 opened 4 years ago

damianb50 commented 4 years ago

The code from the example doesn't compile. error: 'sercom2' was not declared in this scope. I don't see this variable declared in the header file or anywhere. What is it?

pulasthieka commented 3 years ago

DOES NOT WORK with AVR boards: Arduino UNO, Arduino Mega

Solution 1: Change to a board that has multiple SERCOM Interfaces. eg: Arduino Zero Solution 2: Modify the code to remove STS2 and MyWire

Explanation sercom2 (SERial COMmunication) is used for additional SPI or I2C ports. The normal Arduino boards (eg: Arduino UNO, Arduino Mega) has only one such port. Therefore it will not support sercom2, sercom3 commands. You will need to use a SAMD board like Arduino Zero, MKRZero or MKR1000 Board to get it working.