Arduino Due board

Hi guys,

I am getting started with the Arduino Due board and I can't do any input instructions. The Hello_World project works well, but if I want to use some getchar() instructions(as in the test_shell project) nothing happens. I connected my UART device to TX0 and RX0 pins and it seems like only the TX0 pin works...

Anyone knows how to make it works ??

Cheers,

Maxime

Hi Maxime,

this problem is known, the reason is the (intentional) missing implementation of the uart0 driver. There is a simple workaround however:

in `tests/test_shell/main.c` change line 56 from `int result = posix_read(uart0_handler_pid, &c, 1);` to `int result = (int)getchar()`

The same works for the `examples/default`application.

I will try to provide a fix, so that these projects will work out of the box in the future...

Cheers, Hauke

Hi Hauke,

Thanks for your answer,

Actually I had already tried this because I work with Peter Kietzmann and he told me to do this (You helped him for the same problem on the stm32f4discovery if I am not wrong). However "getchar()" seems not to end, I tried to print something after this instruction. I don't know if getchar() waits for an EOF that never comes or if my RX pin just does not send anything.

Cheers,   Maxime

Hauke Petersen <hauke.petersen@fu-berlin.de> a écrit :

Hi Maxime,

I just prepared a PR that fixes your problems [1]. I tested it with the arduino-due, so it sould work for you.

Cheers, Hauke

[1] https://github.com/RIOT-OS/RIOT/pull/1465

I am confused because it still does not work...

May be I am using the wrong tools ? As I did for stm32f4discovery, I am using pyterm to launch my "/dev/ttyUSBxxx" which is my UART device. Then I only connect it to the TX0, RX0 and GND pins.

Can you describe me what you did to make it works ? Because I have been looking for some tutorials for Arduino Due but I do not find anything very interesting...

Cheers, Maxime

Hauke Petersen <hauke.petersen@fu-berlin.de> a écrit :

Hi Maxime,

for the arduino-due you actually do not need to connect any external uart-usb adapter, as the arduino already has one included. For the default project, you should be able to do the following:

cd examples/default make -B clean all make flash make term

This open a connection to the board and you should be able to talk to the shell (sending to the board only works with my patch.. -> see PR below).

Cheers, Hauke

Many thanks,

It fixed my problems, now it works perfectly.

Cheers, Maxime

Hauke Petersen <hauke.petersen@fu-berlin.de> a écrit :