Page 1 of 1

Raspberry Pi, Arduino Nano, MPU6050

Posted: Tue Mar 31, 2020 9:12 pm
by dlmed
Hi, I wanna know if there is a way to connect RPi to Arduino Nano without using USB, yet allowing me to upload code from RPi to Arduino and also being able to connect Arduino Nano with MPU6050 via I2C.

Re: Raspberry Pi, Arduino Nano, MPU6050

Posted: Wed Apr 01, 2020 9:25 am
by IanS
The Pi has two UARTs which can be used for serial communications. See ... on/ The Arduino can also do serial communications through USB and also via the RX and TX pins. However, the Pi uses 3.3V logic and the Arduino varies by board type. The Nano uses 5V I think. You will need a logic level converter between them. Your connections will be Pi RX to Ard TX via converter, Pi TX to Ard RX via converter and Pi Gnd to Ard Gnd directly. You will also need to set the communication parameters (baud rate, stop bits, parity, etc) the same at each end.

There are a number of Arduino libraries to use an MPU6050. The Jeff Rowberg library was the main one for a long time, but there are others (FreeIMU, Electronic Cats, etc). These are often based on Jeff's original code.