background preloader

Code and Life – Arduino and Raspberry Pi Serial Communication

Code and Life – Arduino and Raspberry Pi Serial Communication
Today’s the last day of my summer holiday, and I had some free time on my hands. So I decided to see if I could get my Arduino Uno and Raspberry Pi to talk to each other. It turned out the task was even easier than my previous Pi to RS-232 project – all that was needed between the two devices was some jumper wire and two 1 kOhm resistors to form a voltage divider between Arduino TX pin and Pi RX pin – Arduino understands Pi’s 3.3V signal levels just fine so Pi TX to Arduino RX needed no voltage shifting at all. IMPORTANT UPDATE! It turns out that the RX pin on the Arduino is held at 5V even when that pin is not initialized. I suspect it is due to the fact that the Arduino is programmed via these same pins every time you flash it from Arduino IDE, and there are external (weak) pullups to keep the lines to 5V at other times. Setting Raspberry Pi up for serial communications minicom -b 9600 -o -D /dev/ttyAMA0 Then open Putty or similar serial terminal on PC side. #! import serialimport string

http://codeandlife.com/2012/07/29/arduino-and-raspberry-pi-serial-communication/

Related:  raspberry / arduinoRaspberry Pi - TrucsIoT

Liam Jackson: Arduino and Raspberry Pi - Talking over UART Serial What are the raspberry Pi and arduino? - Skip this bit if you know that The arduino is a great little board, offering quite a lot of General Purpose input and Output (GPIO) these are pins you can program to be 'High' (usually +5V) or 'Low' (0v). Those are used to turn on or control LED's, motors and anything else electronic in the 'real world'. Raspberry Pi master controls Arduino UNO slaves via I2C #// Arduino I2C Wire master version 0.2 #// Turns the Raspberry Pi into a I2C master device using I2C-tools. #// send commands to the I2C Arduino slave for configuring pins, #// read and write to pins via a simple instruction set. Binerry, Raspberry Pi with I2C-Arduino-Slave Since Raspberry Pi has only about 8 GPIO’s (or up to 17 if you reconfigure UART, SPI and I2C as GPIO) or for some other reasons, it may be helpful to combine Raspberry Pi with another μC or PIC (or even a ready-to-use μC-/PIC-Board like Arduino, Netduino or Pinguino) e.g. to get more I/O’s or just to seperate two different application areas. Such a combination is surely easy to setup via serial or usb - but at least if serial/usb is already in use or if you are thinking about using more than one further μC or PIC its getting a bit clumsy. Much more flexible and cleaner will be a solution via I2C - in this case you can easily address up to 128 slaves. So why not combine Raspberry Pi with for example Arduino?

Introducing RasPiO<sup>®</sup> The day has finally arrived for me to launch my first three products in the RasPiO® range. What’s RasPiO®? I hear you ask? It’s a family of add-on boards for the Raspberry Pi®. INSTALL - webiopi - Raspberry Pi Internet of Things framework - Google Project Hosting WebIOPi is developed and tested on Raspbian. You only need Python, either 2.7 or 3.2. Download, then extract and install WebIOPi. The setup script will automatically download and install required dependencies using apt-get.

Interfacing with a Wiimote - Physical Computing with Raspberry Pi Difficulty: intermediate This tutorial will show you how to connect a Wiimote to the Pi over Bluetooth. You will then be able to read input from it, including the state of the buttons and accelerometer and send it output, e.g. changing the LED state and playing with rumble. It is recommended to use one of our SD cards or images, if you are not then you will need: python-cwiid and to set your Bluetooth in discoverable mode with sudo hciconfig hci0 piscan. Log into your Pi and start a Python console (or ipython if you want tab completion and other extra features).

Arduino Vs. Raspberry Pi: Which Is The Right DIY Platform For You? If you’re at all familiar with do-it-yourself (DIY) electronics, you’ve probably heard about the comparable merits of Arduino and Raspberry Pi. You may have even, like I did, assumed they were competing hardware platforms solving similar problems. Actually, Arduino and Raspberry Pi are quite different. Adafruit Raspberry Pi Educational Linux Distro This is our second distro, Occidentalis v0.2. Rubus occidentalis is the black raspberry. It is derived from Raspbian Wheezy August 16 2012 Ultrasonic Distance Measurement Using Python – Part 1 LEDs, buzzers and switches are the most common items people attempt to interface to their Raspberry Pi’s. Something I found in eBay that is a little bit different is an ultrasonic measurement module. This allows you to measure the distance to the nearest wall or solid object. The modules are easy to buy, cheap and relatively straight forward to interface to the GPIO header. So here is some information on my experiments with an Ultrasonic measurement module and Python.

s Raspberry Pi Lesson 6. Using SSH In this lesson you will learn how to remote control your Raspberry Pi over your local network using Secure Shell (SSH). A common reason for remote controlling your Pi from another computer is that you may be using your Pi solely to control some electronics and therefore not need a keyboard, mouse and monitor, other than for setting it up. It also can just save on desktop clutter, and the problem of having multiple keyboards and mice all over the place. Arduino Playground - InterfacingWithHardware These topics cover the hardware and software setup required to connect an Arduino device with a variety of electronic parts, chips and devices. A related topic not covered under this section is the shield, boards that plug directly into an Arduino's pin layout. Information on the creation and use of specific shields belongs in that section.

learn.adafruit When you buy a Raspberry Pi, it may or may not be sold with an SD card. The SD card is important because this is where the Raspberry Pi keeps its operating system and is also where you will store your documents and programs. Even if your Pi came with an SD card with an operating system on, it is a good idea to update it to the latest version, as improvements and bug fixes are going in all the time. Arduino - ArduinoBoardDuemilanove Overview The Arduino Duemilanove ("2009") is a microcontroller board based on the ATmega168 (datasheet) or ATmega328 (datasheet). It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started. "Duemilanove" means 2009 in Italian and is named after the year of its release.

Raspberry Pi - SSH Public Key Authentication Introduction This tip describes how you can increase your security level by using public key authentication. The tip is dedicated to Rapsberry Pi SSH users, but can be used by any Linux user (Raspbian is based on Debian). The client side presented is Windows Putty. Raspberry Pi is a very powerful device, especially if you are going to use it to control some other hardware like home automation or robotics.

Related: