Arduino

From Leo's Notes
Revision as of 22:38, 20 January 2018 by Leo (talk | contribs)
This page was last edited on 20 January 2018, at 22:38.

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), TX (Pin 1), Reset (RST) from the Arduino Uno/Duemilanove to RXI, TXO, RST 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