Sensirion / embedded-uart-sps

Embedded UART Driver for Sensirion Particulate Matter Sensors - Download the Zip Package from the Release Page
https://github.com/Sensirion/embedded-uart-sps/releases
BSD 3-Clause "New" or "Revised" License
44 stars 24 forks source link

"arduino_sps30_example.ino" does not compile #13

Closed EKolev closed 5 years ago

EKolev commented 5 years ago

I installed embedded-uart-sps following the instructions in the README file. I am using the arduino implantation from "sample-implementations/Arduino/sensirion_uart_implemenation.cpp" to compile the example arduino sketch and I am getting the following error:

"sensirion_uart_implementation.cpp:51:1: error: 'Uart' does not name a type Uart Serial2 (&sercom1, PIN_UART_RX, PIN_UART_TX, SERCOM_RX_PAD_0, ^ "

I am using an Arduino Uno board.

I tried the linux version on my Raspberry Pi and it works fine.

per1234 commented 5 years ago

That code is specific to the SAMD boards like the Zero, MKR, etc. AVR boards like your Uno don't have SERCOM.

EKolev commented 5 years ago

I see, I deleted this line and used just 'Serial' in their implementation file and it worked.

Thank you.

abrauchli commented 5 years ago

@per1234, @EKolev thanks for the input, I'll add a comment the file

nit1995 commented 5 years ago

@EKolev Can you share the code for Arduino implementation, please?