Arduino: Difference between revisions

From Leo's Notes
This page was last edited on 28 February 2017, at 20:58.
No edit summary
Line 10: Line 10:


== Arduino and Raspberry Pi Serial Integration ==
== Arduino and Raspberry Pi Serial Integration ==
[[File:Pi-arduino-uart.png|350px|thumb|right|Arduino to Raspberry Pi Connection]]
To make the arduino talk directly to the Pi via the UART pins, keep in mind that the arduino communicates at 5v while the Raspberry Pi can only work with 3.3v.
To make the arduino talk directly to the Pi via the UART pins, keep in mind that the arduino communicates at 5v while the Raspberry Pi can only work with 3.3v.



Revision as of 20:58, 28 February 2017

Programming the Arduino Mini/Nano

Arduino Uno/Duemilanove to Mini Connection

You can use a regular Arduino Uno or Duemilanove to program an Arduino Mini. To do so:

  1. Connect GND and VCC from the Arduino Uno/Duemilanove to the Arduino Mini/Nano
  2. Pull the Atmega 328 microprocessor from socket on the Arduino Uno/Duemilanove
  3. Connect RX (Pin 0) and TX (Pin 1) from the Arduino Uno/Duemilanove to RXI and TXO pins on the Arduino Mini/Nano respectively.

Then program the Arduino as you normally would while making sure that the board selected in the Arduino IDE is set to the Arduino Mini or Nano.

Arduino and Raspberry Pi Serial Integration

Arduino to Raspberry Pi Connection

To make the arduino talk directly to the Pi via the UART pins, keep in mind that the arduino communicates at 5v while the Raspberry Pi can only work with 3.3v.

A possible hack is to run the arduino at 3.3v rather than 5v and then connect:

  • Arduino Pin 0 (RXI) to Raspberry Pi Pin 8 (UART0_TXD)
  • Arduino Pin 1 (TXO) to Raspberry Pi Pin 10 (UART0_RXD)

This gets around needing to step up/down the voltages from 3.3v to 5v since everything will be at 3.3v.

If everything works, you should be able to talk with the arduino via the serial device. See the Raspberry Pi Serial page