Arduino: Difference between revisions

From Leo's Notes
This page was last edited on 1 September 2019, at 01:58.
No edit summary
m Recategorize
Line 28: Line 28:


[[Category:Arduino]]
[[Category:Arduino]]
[[Category:Tinkering]]{{Navbox Tinkering}}

Revision as of 01:58, 1 September 2019

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.

Arduinos From Ebay

Arduino Settings

The very cheap arduinos from Ebay (https://www.ebay.ca/itm/5PCS-Pro-Mini-Atmega168-board-5V-16M-Compatible-Nano-Replace-Atmega328-A/182788153807?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649) are Arduino Mini's with ATmega168.

If you're having issues uploading, make sure the settings look like the image on the left.

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