RESOLVED: Problems with I2C LED backpack

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
ericbrian
 
Posts: 26
Joined: Mon Jun 18, 2012 8:52 am

RESOLVED: Problems with I2C LED backpack

Post by ericbrian »

I bought the 8x8 matrix and the backpack to go along with it. In my project, I am using it on an Arduino Leonardo. I can get everything to run on an Uno, but on the Leonardo, I only get a random few LEDs to light up and once lit, nothing else happens.

I am wondering, could it be that the Adafruit_LEDBackpack library doesn't work with the Leonardo?

The code enters Setup:

Code: Select all

void setup() {
  Serial.begin(9600); 
  Serial.println("Setup Start!");

  pinMode(humLed, OUTPUT);        // sets the digital pin as output
  pinMode(tempLed, OUTPUT);      // sets the digital pin as output

  dht.begin();
  matrix.begin(0x70);  // pass in the address
  Serial.println("Setup End!");
}
The code chokes on matrix.begin(0x70);. When I comment that out, the rest of the program runs fine. When it isn't commented out, the rest of the program does not work.

Thanks
Eric
Last edited by ericbrian on Tue Jul 10, 2012 6:52 am, edited 1 time in total.

User avatar
pburgess
 
Posts: 4161
Joined: Sun Oct 26, 2008 2:29 am

Re: Problems with I2C LED backpack

Post by pburgess »

Do you have the backpack connected to the SDA & SCL pins, rather than Analog 4 & 5? The Leonardo is a strange animal and requires different pin usage for many things.

User avatar
ericbrian
 
Posts: 26
Joined: Mon Jun 18, 2012 8:52 am

Re: Problems with I2C LED backpack

Post by ericbrian »

Yes, that was the problem. I looked at the pin mapping chart on arduino.cc and found that the pins have changed. After fixing that, I had to update the pins in the software too and now, everything runs smoothly. Thanks for the suggestion!!!!

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

Return to “Arduino”