How to use gpio (Arduino Uno)

Hello, I am new to riot-os and was trying to run a native application which toggles a led on pin 13 (arduino-uno), I was able to use arduino sketch but it seems it is not working properly. So I though I will give native program a try.

But I am not sure how to initialize gpio and use it (e,g USEMODULE?) so is there any sample on how to use the gpio in riot-os?

Thanks in advance, Shovon.

Hi Shovon,

first of all: welcome to the RIOT community! The arduino-uno support in RIOT is WIP [1] and currently not part of the RIOT master. Did you use that pull request?

What do you mean by the "native program"? "native" in RIOT is a hardware emulation running in a linux process on your PC and it has no real GPIOs. Basically every program can be built for the native board but I'm not aware of any "native program".

[2] demonstrates how to use GPIOs. It comes with a small shell and allows to initialize, set and read pins during runtime.

Best regards Peter

[1] [2]

Hello Peter, Thank you for reply. Yes I am using that pull request. And by native programming I meant using the function provided by the OS to program GPIO instead relying on arduino library. Sorry for my bad wording. And thanks for the link, I will definitely check out them.



you're welcome! Would you report the status of your GPIO testing on the aruino-uno in please? The driver is WIP and it would be nice for @mali to get some feedback.

Best Peter

Hello Peter, I will do so as soon as possible.