gebes
Posts: 8
Joined: Tue Jul 24, 2012 4:01 pm

Where to begin with an Arduino

Wed Oct 03, 2012 9:37 am

I've been using my Pi almost at the centre of a Home cinema setup, having gotten ( thanks to this forum ) XBMC fully working and talking to my NAS.

I've learnt how to install Chromium, amongst other things again thanks to this forum. But still consider myself to be a "wet behind the ears " beginner to Linux in general.

A friend recently gave me an Arduino Uno Kit, which I believe can work with the Pi , So I now find myself wanting to learn how to get the 2 devices talking etc.

Bearing in mind that I am a beginner, can anyone recommend some form of project I can try my hand at, that involves using the 2 devices ?

Any advice anyone can give to simple projects involving the Pi and Arduino would be gratefully appreciated.

User avatar
joan
Posts: 14193
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Where to begin with an Arduino

Wed Oct 03, 2012 9:49 am

Best place to start is probably downloading the Arduino IDE and checking out a few basic sketches (Arduino speak for programs). I wouldn't download the IDE to the Pi as it's likely to be a painfully slow experience to use on the Pi.

http://arduino.cc/en/Main/Software

User avatar
exartemarte
Posts: 373
Joined: Sat Mar 03, 2012 3:51 pm
Location: Middle England
Contact: Website

Re: Where to begin with an Arduino

Wed Oct 03, 2012 1:04 pm

Agreed. Start by programming the Arduino using your PC or laptop - even when you eventually connect it to your RPi, you'll have to program the Arduino first. Get used to the things it can do: digital inputs and outputs; (multiple) ADC; (multiple) PWM; timing. When you tire of things that just go on and off or beep, try controlling the speed and direction of a small motor or two using a motor driver such as the ubiquitous L293D or equivalent; get yourself one of these cheap ultrasonic modules and make a rangefinder or object detector, maybe think about how that might be used on a mobile robot.

Then, when you're comfortable with the Arduino, and especially with the things it does well that the RPi does less well or not at all, it will be time to think about how you want your RPi to communicate with the Arduino - serial port? I2C? SPI?

Enjoy the journey!

AforAlex
Posts: 85
Joined: Thu May 31, 2012 7:56 pm

Re: Where to begin with an Arduino

Wed Oct 03, 2012 7:45 pm

Check out the latest MagPi magazine, there is an article about using Arduino with the Pi ... might not cover exactly what you are trying to do, but may help a bit. Good luck

User avatar
gordon@drogon.net
Posts: 2020
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
Contact: Website

Re: Where to begin with an Arduino

Wed Oct 03, 2012 8:42 pm

joan wrote:Best place to start is probably downloading the Arduino IDE and checking out a few basic sketches (Arduino speak for programs). I wouldn't download the IDE to the Pi as it's likely to be a painfully slow experience to use on the Pi.

http://arduino.cc/en/Main/Software
The Arduino IDE is very usable on the Pi. Yes, it's a little slow, but it's still usable. However, I'd strongly suggest not trying to install from the arduino site, but to install the native packages:

sudo install arduino

will bring in just about everything you need to bring in.

After that, plug the Arduino into the USB port, run up the IDE and off you go.

-Gordon
--
Gordons projects: https://projects.drogon.net/

osbock
Posts: 19
Joined: Fri Jun 08, 2012 1:07 pm

Re: Where to begin with an Arduino

Thu Oct 04, 2012 2:09 am

If you have an Uno, you have to create a link in the /dev directory too. There are new simplified directions on my blog:
http://baldwisdom.com/simplified-setup- ... pberry-pi/

Return to “Automation, sensing and robotics”