angewng
Posts: 3
Joined: Fri Oct 18, 2019 12:50 am
Location: Asuncion, Paraguay

Connect a Arduino Nano to RPi 3B+ via I2C

Fri Oct 18, 2019 1:07 am

Hello everyone, my situation is that I am trying to use an MQ135 air quality sensor with the Raspberry Pi so that it goes up to ThingSpeak, but since it uses an analog output, I would like to use a Nano via I2C, I just don't have a idea of how to do the programming and the connection through in that case. Awaiting prompt response, thanks.

User avatar
neilgl
Posts: 1129
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near Aston Martin factory

Re: Connect a Arduino Nano to RPi 3B+ via I2C

Fri Oct 18, 2019 7:48 am

I would forget the Arduino and just use an analog to digital (ADC) chip to interface it, e..g. MCP3008 ADC

User avatar
Gavinmc42
Posts: 3927
Joined: Wed Aug 28, 2013 3:31 am

Re: Connect a Arduino Nano to RPi 3B+ via I2C

Fri Oct 18, 2019 7:56 am

Learn how to use the Arduino or any other 3v3 micro that can be an i2c slave.
Set up the Arduino as i2c slave.
I2cdetect on the Pi can be used to see if that works.
It gets easier after that.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges


angewng
Posts: 3
Joined: Fri Oct 18, 2019 12:50 am
Location: Asuncion, Paraguay

Re: Connect a Arduino Nano to RPi 3B+ via I2C

Fri Oct 18, 2019 11:28 pm

neilgl wrote:
Fri Oct 18, 2019 7:48 am
I would forget the Arduino and just use an analog to digital (ADC) chip to interface it, e..g. MCP3008 ADC
I know, look everywhere for that same ADC and ads1115, but I couldn't get them. My only option was the Arduino. Thank you for answering.

User avatar
neilgl
Posts: 1129
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near Aston Martin factory

Re: Connect a Arduino Nano to RPi 3B+ via I2C

Sat Oct 19, 2019 9:57 am

There are many sellers on eBay - not sure if that works from Paraguay?

angewng
Posts: 3
Joined: Fri Oct 18, 2019 12:50 am
Location: Asuncion, Paraguay

Re: Connect a Arduino Nano to RPi 3B+ via I2C

Sat Oct 19, 2019 11:40 pm

neilgl wrote:
Sat Oct 19, 2019 9:57 am
There are many sellers on eBay - not sure if that works from Paraguay?
Yes, I know but this is a final project for a subject in my school and the date of delivery is this next monday. Btw all the problems were finally solved using the serial connection. Thank you to all for answering. :D :D

User avatar
neilgl
Posts: 1129
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near Aston Martin factory

Re: Connect a Arduino Nano to RPi 3B+ via I2C

Sat Oct 19, 2019 11:42 pm

OK glad you got it working!

Return to “Beginners”