I am trying to get numbers to display on the 8x8 matrix. When the program starts, it does display 1 , but it then is blank after that. Please look at my code. Thank you
Code: Select all
/***************************************************
This is a library for our I2C LED Backpacks
Designed specifically to work with the Adafruit LED Matrix backpacks
----> http://www.adafruit.com/products/872
----> http://www.adafruit.com/products/871
----> http://www.adafruit.com/products/870
These displays use I2C to communicate, 2 pins are required to
interface. There are multiple selectable I2C addresses. For backpacks
with 2 Address Select pins: 0x70, 0x71, 0x72 or 0x73. For backpacks
with 3 Address Select pins: 0x70 thru 0x77
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Limor Fried/Ladyada for Adafruit Industries.
BSD license, all text above must be included in any redistribution
****************************************************/
#include <Wire.h>
#include <Adafruit_GFX.h>
#include "Adafruit_LEDBackpack.h"
Adafruit_8x8matrix matrix = Adafruit_8x8matrix();
void setup() {
Serial.begin(9600);
Serial.println("8x8 LED Matrix Test");
int i=0;
matrix.begin(0x70);// pass in the address
}
void loop() {
matrix.clear();
matrix.print('1');
matrix.writeDisplay();
delay(500);
matrix.clear();
matrix.print('2');
matrix.writeDisplay();
delay(500);
matrix.clear();
matrix.print('3');
matrix.writeDisplay();
delay(500);
matrix.clear();
matrix.print('4');
matrix.writeDisplay();
delay(500);
}