Using internal Raspberry Pi to run Arduino IDE

Perhaps I'm got completely the wrong end of the stick but I'm trying to run Arduino IDE on the Pi internal to my Rapiro (using ssh -X to my netbook) however when I try and upload the sketch, it can't seem to find the COM1 serial port and the menu item to select a serial port is greyed out.

posted by stephen.elves on 2014-03-03 21:13

Try following this it has great examples.

http://www.element14.com/community/community/raspberry-pi/raspberrypi_projects/blog/2014/02/16/rapiro-putting-it-together-and-first-steps#jive_content_id_Kit

posted by Raspians.com on 2014-03-04 13:15

The Arduino sketch comes with some predefined movement sequences and positions. They can be called via the serial interface of the Pi.

I installed minicom:

pi@rapiro ~ $ sudo apt-get install minicom

I couldn't find an actual list of sequences documented anywhere, so I derived some from the Arduino code.
To execute them, you pass the sequence's number via the serial interface:

pi@rapiro ~ $ echo "#M6" | sudo minicom -b 57600 -o -D /dev/ttyAMA0

posted by Raspians.com on 2014-03-04 13:16

I've looked at that site the problem is uploading the sketch to the Rapiro board in the first place, all of the examples seem to assume that you will use Computer running Arduino IDE -> micro USB -> Rapiro.
I am trying to do Internal Raspbery Pi running Arduino IDE -> GPIO ribbon cable connection ->Rapiro.

Is this just not possible?

posted by stephen.elves on 2014-03-04 18:26

I struggle with the Arduino Pi connection but I believe since serial communication between Rapiro and the Pi is available you could try this http://openenergymonitor.blogspot.com/2013/12/developing-for-arduino-remotely-on.html I am not able to test this myself but I know it's possible there is an arduino ide for the pi https://projects.drogon.net/raspberry-pi/gertboard/using-the-arduino-ide/ As seen here the same pins on the Pi are used to communicate with an Arduino chip http://www.instructables.com/id/The-Raspberry-Pi-Arduino-Connection/?ALLSTEPS

posted by Raspians.com on 2014-03-04 18:55

Worst case scenario would be to get one of these listed in the article to connect the Pi back to the USB (Same connection as used to connect to Windows / MAC to upload it)
http://www.mouser.com/ProductDetail/FTDI/TTL-232R-RPI/?qs=3tuk1l7PSbNqj0mOeA5IPw%3D%3D&gclid=CO3zxtyD7rwCFYeEfgodfF4AiQ

you would need an adapter from USB to microusb. But the Rapiro does have the FT231X

http://www.ftdichip.com/Products/ICs/FT231X.html I just don't know if it routes through the GPIO of the Pi.

posted by Raspians.com on 2014-03-04 19:19

I think the 6 pin header JP6 on the Rapiro might be how to accomplish it but I don't know for sure. https://lh5.googleusercontent.com/-8v__v2CYdPs/Uu5ky7r2WYI/AAAAAAAACfo/wRDY8C-1XoQ/w732-h488-no/043_2.jpg looking at the schematic at the top right section of VAVR and For AVR Programming it looks like they line up to the micro usb. Which pins would go to the Pi would need clarification for me though. http://www.rapiro.com/wp-content/uploads/2014/03/RAPIRO.pdf

posted by Raspians.com on 2014-03-04 20:02

Executing the command "sudo ln /dev/ttyACM0 /dev/ttyS0"

enables the Arduino IDE program to talk to the Rapiro control board via GPIO serial pins

http://www.element14.com/community/community/raspberry-pi/raspberrypi_projects/blog/2014/02/16/rapiro-putting-it-together-and-first-steps?et=blogs.comment.created#comment-31840

posted by Raspians.com on 2014-03-11 07:11

"sudo ln /dev/ttyAMA0 /dev/ttyS0" works for me.

posted by brad98408 on 2014-03-12 06:09

Serial monitor works but when I try to upload the sample program i get
"avrdude: stk500_recv(): programmer is not responding"
googling the error did not provide a fix that works for me.
Uploading the same program with the Windows Arduino IDE works.

posted by brad98408 on 2014-03-12 10:15

"sudo ln /dev/ttyAMA0 /dev/ttyS0" works for me on pi3b

posted by jooooooooo on 2018-04-23 00:09

Read Terms of Service upon submitting. 投稿する前に利用規約をお読みください。