In this Instructable, I'll demonstrate how to program an Arduino with a Raspberry Pi.
My Twitter: twitter.com/steveschuler20
The parts I used for this project include the Kano Computer Kit Complete (Raspberry Pi with screen and keyboard) and the Snapino kit by Elenco (Snap Circuits Arduino block, several Snap Circuits components, battery pack and programming cable). These are optional. All you need for this project are the following:
Raspberry Pi 3
Power source for Raspberry Pi 3 (AC Adapter, or mobile phone battery back)
Keyboard for the Raspberry Pi
Screen (computer screen or TV with HDMI connector)
USB programming cable for the Arduino
Step 1: The Kano Computer Kit With Screen and Keyboard
Pictured above is the Kano computer (with screen and keyboard) that I used for this project. In the first picture you can see the Raspberry Pi 3 in it's case on the right, and it is connected to the screen driver board on the left. The yellow cable is the HDMI cable, and the red cables run to the power adapter. The second picture Is the Kano computer booted up the Kano Desktop.
Step 2: The Elenco Snap Circuits Snapino Kit
Pictured above is the Snapino kit. Though the kit comes with several Snap Circuits components, for this project I'll only be using the orange Arduino block and the blue programming cable.
To program the Arduino with the Raspberry Pi I needed to install the Arduino IDE on the Kano Computer (make sure you're connected to the Internet thru WiFi). On the Kano desktop, I opened apps, then clicked on the code tab and opened the Terminal program.
On the terminal screen, I used the following commands:
sudo apt-get update
sudo apt-get install arduino
Once the installation was complete I rebooted the Kano computer
Step 4: Open the "Blink" Arduino Sketch
Once the Kano was rebooted, on the Kano desktop, I opened apps, then clicked on the "Others" tab, and opened the Arduino IDE. In the Arduino IDE I went to File > Examples > Basics > Blink and loaded the Blink Sketch example.
Step 5: Upload the Sketch to the Arduino and Watch the Arduino LED Flash
Next I connected the Snap Circuits Arduino block to the USB port of the Raspberry Pi 3 board on the Kano computer.
Once the Uno is connected, click the upload button in the Arduino IDE. After a few (or maybe several) moments the sketch is uploaded to the Uno and the LED on the Uno begins to flash.
To conclude, this was a simple demonstration of how to program an Arduino with a Raspberry Pi.