Question regarding RIOT-OS Arduino module

Dear RIOT user mailing list,

My name is Afif, i am a student majoring in Computer Engineering and currently learning about how to use RIOT-OS for my project. My primary objective in this project is creating an NDN-RIOT plant monitoring IoT system using Arduino boards. There's some question that i would like to ask regarding RIOT-OS.

So here's my question : 1. I was trying to run the arduino-hello world example that was provided in RIOT, but when i try to run the program by using "make all" there's an error that said the system expect an Arduino board library. Is that supposed to happen? 2. I went and change the board in arduino_hello-world from native to my arduino-mega2560 but there's another error that said my pyterm didn't have serial module. So after few research in the internet i found out i need to install pyserial, but even after i installed pyserial in my RIOT/dist the problem still remain. Is there something else that i need to do? 3. So i try to build my own program using Arduino sys library, my program is a simple DHT sensor reader that include DHT library, but it seems like there's always a library missing in my program from each library include such as Arduino.h and then esp8266_version.h etc. Do i need to copy every library from Arduino to my RIOT/sys/arduino/include ?

Can anyone please kindly help me solve this problem? Thank you for your attention, your answer is much appreciated.

With utmost respect,

Afif Aziz

Hi Afif,

welcome to RIOT!

Dear RIOT user mailing list,

My name is Afif, i am a student majoring in Computer Engineering and currently learning about how to use RIOT-OS for my project. My primary objective in this project is creating an NDN-RIOT plant monitoring IoT system using Arduino boards. There's some question that i would like to ask regarding RIOT-OS.

So here's my question : 1. I was trying to run the arduino-hello world example that was provided in RIOT, but when i try to run the program by using "make all" there's an error that said the system expect an Arduino board library. Is that supposed to happen?

When you only call "make term" without BOARD=... the application compiles for RIOT native which does not implement the Arduino wrapper so it is somewhat expected, although setting native as default platform is maybe not the smartest choice. However, which of ~90 boards would you set as default instead...

Why does it have to be the Arduino API [1] anyway? I don't think that's helpful if the next step is using NDN.

2. I went and change the board in arduino_hello-world from native to my arduino-mega2560 but there's another error that said my pyterm didn't have serial module. So after few research in the internet i found out i need to install pyserial, but even after i installed pyserial in my RIOT/dist the problem still remain. Is there something else that i need to do?

Pyserial is a python dependency of out tool named pyterm. 'pip install pyserial' should install that for you.

3. So i try to build my own program using Arduino sys library, my program is a simple DHT sensor reader that include DHT library, but it seems like there's always a library missing in my program from each library include such as Arduino.h and then esp8266_version.h etc. Do i need to copy every library from Arduino to my RIOT/sys/arduino/include ?

I'd suggest not do use the Arduino API but rather use the explicit driver API or SAUL. If you want to get started with NDN-RIOT, I'd suggest to play with examples/ndn_ping [3] first.

Cheers Peter

[1] https://riot-os.org/api/group__sys__arduino.html [2] https://riot-os.org/api/group__drivers__saul.html [3] https://github.com/RIOT-OS/RIOT/tree/master/examples/ndn-ping