TSL2561 doesn't work with Arudino Mega

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
sam001
 
Posts: 1
Joined: Wed Apr 22, 2015 11:02 pm

TSL2561 doesn't work with Arudino Mega

Post by sam001 »

Hi,

I was using an Arduino Uno R3 for my project, and I decided to move my project on my Arduino Mega. The example code "sensorapi" works perfectly with the R3, but the same exact code will not work on the Arduino Mega.

It's being hooked up to Analog4/5 on both arduinos--as per adafruit instruction.


I don't understand why this is happening, and I need a solution :(

Can someone please help?


(Yes, I have verified with other projects that the arduino works)

User avatar
Franklin97355
 
Posts: 23911
Joined: Mon Apr 21, 2008 2:33 pm

Re: TSL2561 doesn't work with Arudino Mega

Post by Franklin97355 »

It's being hooked up to Analog4/5 on both arduinos
The TSL2561 is an i2c device but the i2c (TWI) pins on a mega are not on the same pins as on a Uno. http://www.arduino.cc/en/Main/arduinoBoardMega2560
TWI: 20 (SDA) and 21 (SCL). Support TWI communication using the Wire library. Note that these pins are not in the same location as the TWI pins on the Duemilanove or Diecimila.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”