Hey,

this error comes from the initialisation of the gpio pins [0].

You can find that the default params of the srf04 [1] pins are set to GPIO_PIN(0,13) and GPIO_PIN(0,14). Those are kind of logical pins - NOT pins 13 and 14 on your hardware - and it seems RIOT does not provide these logical pins on the arduino-atmega boards as given in the boards config [2] (these are definitions for a family of arduino boards, one of them is the uno).

You will have to set up your own params, to change the GPIO Pins to some available pins from [2].


best
Semjon


[0] https://github.com/RIOT-OS/RIOT/blob/master/drivers/srf04/srf04.c#L53

[1] https://github.com/RIOT-OS/RIOT/blob/master/drivers/srf04/include/srf04_params.h#L34 [2] https://github.com/RIOT-OS/RIOT/blob/master/boards/common/arduino-atmega/include/arduino_pinmap.h


Am 28.03.2019 um 11:50 schrieb lefteris mourelatos:
Hello,
I am currently trying the srf04 test and i constantly have the same error "Error initializing".I did some digging but i can't find any solution to this problem.I am using an arduino-uno for this task.
Thank you in advance!

_______________________________________________
users mailing list
[email protected]
https://lists.riot-os.org/mailman/listinfo/users
_______________________________________________
users mailing list
[email protected]
https://lists.riot-os.org/mailman/listinfo/users

Reply via email to