For the longest time I've been trying to find out how to program the arduino directly using the serial interfact in GPIO, I spent a lot of time trying to find how to do it and ended up stumbling on a tutorial showing how to set it up for the Raspberry pi. Simply changing the values of the GPIO serial to match the odroid worked a charm in lubuntu 14.04. I did a lot of steps that I'm beginning to think I didn't need to, for example installing command line tools. I think I only needed to these steps, if you have any issues I'll link the documentation that I followed to get it working so you can follow that if need be.
First thing to do is to check if the serial port is being used by the kernal, to do this you want to enter in the terminal
If it's anything like mine nothing will be using it, there'll be two files that are Symbollically linking ttySAC0 to ttyACM99 but nothing else, that's fine.
Next you'll need to edit /etc/sysctl.conf file. Add to the bottom:
This is to stop the kernel from calling the port and causing it to hang on boot, I've actually got no idea if it actually does anything on the odroid but I put it in there and it works so it must be doing something. (Can you tell I'm an amateur?)
Next step, you'll need to set a few environment variables so that the odroid knows where the arduino is hooked up. Add the below to your .bashrc or .profile file found in your home folder. They are hidden.
Code: Select all
Now, the most important step is the hookup, you'll need to run all the connections through a logic level converter as the ARDUINO uses 5V whereas the ODROID uses 1.8, if you put 1.8 into the ODROID you will damage it, so best to just get a logic level converter. You'll need 3 Data pins, RX, TX, and GPIO #204. Through the logic level converter, connect RX on the odroid to TX on the Arduino, TX on the odroid to RX on the arduino, and GPIO #204 through the logic level converter to the reset pin on your Arduino. I don't know if it calls for this or I just got lucky, but it seems to reset correctly as it needs to in order to upload new sketches, it works so I'm going to assume I accidentally set it up correctly.
Now that you've done that it should all work, open the Arduino IDE, make sure the arduino selected is an UNO and that the Serial Port is ttyACM99 and it should be good to go. Upload blink example and hook an LED up to pin 13 to ground and it should start blinking.
http://www.deanmao.com/2012/08/06/ardui ... pberry-pi/
Original article. Thanks to Deanmao for the good Tutorial.
Enjoy, I hope this was clear and works for everyone.