paulvha / sps30

Sensirion SPS30 driver for ESP32, SODAQ, MEGA2560, UNO,UNO-R4 ESP8266, Particle-photon on UART OR I2C coummunication
GNU General Public License v3.0
66 stars 27 forks source link

Please support NANO 33 IOT board. #13

Closed firepooh closed 4 years ago

firepooh commented 4 years ago

Hi

I'm using NANO 33 IOT board with SPS30 UART Connection. NANO 33 IOT board have a SERIALPORT1 except debug port. If you add code below at "SPS30::setSerialSpeed()" class then very helpful another people. (for beginner like me)

#if defined(__SAMD21G18A__)
        case SERIALPORT1:
            Serial1.begin(_Serial_baud);
            _serial = &Serial1;
            break;
#endif  

Thanks your good code. Good luck.

https://store.arduino.cc/usa/nano-33-iot

paulvha commented 4 years ago

Thanks. I have included your remark and uploaded the new version. Also made a change to the library to use any serial or I2C channel. See example12 and example13