Due to high demand expect some shipping delays at this time, orders may not ship for 1-2 business days.
0

Small 1.2" 8x8 LED Matrix w/I2C HELP SCROLLING
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Small 1.2" 8x8 LED Matrix w/I2C HELP SCROLLING

by markgrecowork on Mon Jan 13, 2014 11:41 pm

I'm a newbie builder and have a tough time with code. I would love arduino code help with using 3 8x8 1.2" side by side.

I can follow directions very well. if the scrolling message said adafruit that would be a bonus!

markgrecowork
 
Posts: 11
Joined: Sat Nov 16, 2013 1:37 pm

Re: Small 1.2" 8x8 LED Matrix w/I2C HELP SCROLLING

by adafruit_support_rick on Tue Jan 14, 2014 7:05 pm

I've moved your topic to the General Project Help forum!

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Small 1.2" 8x8 LED Matrix w/I2C HELP SCROLLING

by adafruit_support_mike on Tue Jan 14, 2014 7:23 pm

When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.

adafruit_support_mike
 
Posts: 63767
Joined: Thu Feb 11, 2010 2:51 pm

Re: Small 1.2" 8x8 LED Matrix w/I2C HELP SCROLLING

by markgrecowork on Tue Jan 14, 2014 11:01 pm

thanks a bunch

markgrecowork
 
Posts: 11
Joined: Sat Nov 16, 2013 1:37 pm

Re: Small 1.2" 8x8 LED Matrix w/I2C HELP SCROLLING

by markgrecowork on Sun Jan 19, 2014 1:01 am

Got the Adafruit example going.
I changed hello world to my name.
I wanted to scroll the alphabet but it will only display about 8 or so letters in a row.
Any ideas?

markgrecowork
 
Posts: 11
Joined: Sat Nov 16, 2013 1:37 pm

Re: Small 1.2" 8x8 LED Matrix w/I2C HELP SCROLLING

by adafruit_support_rick on Sun Jan 19, 2014 12:44 pm

Please post the code you're using

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Small 1.2" 8x8 LED Matrix w/I2C HELP SCROLLING

by markgrecowork on Sun Jan 19, 2014 7:28 pm

Code: Select all | TOGGLE FULL SIZE
#include <Wire.h>
#include "Adafruit_LEDBackpack.h"
#include "Adafruit_GFX.h"

Adafruit_8x8matrix matrix = Adafruit_8x8matrix();

void setup() {
  Serial.begin(9600);
  Serial.println("8x8 LED Matrix Test");
 
  matrix.begin(0x70);  // pass in the address
}

static const uint8_t PROGMEM
  smile_bmp[] =
  { B00111100,
    B01000010,
    B10100101,
    B10000001,
    B10100101,
    B10011001,
    B01000010,
    B00111100 },
  neutral_bmp[] =
  { B00111100,
    B01000010,
    B10100101,
    B10000001,
    B10111101,
    B10000001,
    B01000010,
    B00111100 },
  frown_bmp[] =
  { B00111100,
    B01000010,
    B10100101,
    B10000001,
    B10011001,
    B10100101,
    B01000010,
    B00111100 };

void loop() {
  matrix.clear();
  matrix.drawBitmap(0, 0, smile_bmp, 8, 8, LED_ON);
  matrix.writeDisplay();
  delay(500);

  matrix.clear();
  matrix.drawBitmap(0, 0, neutral_bmp, 8, 8, LED_ON);
  matrix.writeDisplay();
  delay(500);

  matrix.clear();
  matrix.drawBitmap(0, 0, frown_bmp, 8, 8, LED_ON);
  matrix.writeDisplay();
  delay(500);

  matrix.clear();      // clear display
  matrix.drawPixel(0, 0, LED_ON); 
  matrix.writeDisplay();  // write the changes we just made to the display
  delay(500);

  matrix.clear();
  matrix.drawLine(0,0, 7,7, LED_ON);
  matrix.writeDisplay();  // write the changes we just made to the display
  delay(500);

  matrix.clear();
  matrix.drawRect(0,0, 8,8, LED_ON);
  matrix.fillRect(2,2, 4,4, LED_ON);
  matrix.writeDisplay();  // write the changes we just made to the display
  delay(500);

  matrix.clear();
  matrix.drawCircle(3,3, 3, LED_ON);
  matrix.writeDisplay();  // write the changes we just made to the display
  delay(500);

  matrix.setTextSize(1);
  matrix.setTextWrap(false);  // we dont want text to wrap so it scrolls nicely
  matrix.setTextColor(LED_ON);
  for (int8_t x=0; x>=-36; x--) {
    matrix.clear();
    matrix.setCursor(x,0);
    matrix.print("Hello");
    matrix.writeDisplay();
    delay(100);
  }
  matrix.setRotation(3);
  for (int8_t x=7; x>=-36; x--) {
    matrix.clear();
    matrix.setCursor(x,0);
    matrix.print("World");
    matrix.writeDisplay();
    delay(100);
  }
  matrix.setRotation(0);
}

markgrecowork
 
Posts: 11
Joined: Sat Nov 16, 2013 1:37 pm

Re: Small 1.2" 8x8 LED Matrix w/I2C HELP SCROLLING

by markgrecowork on Sun Jan 19, 2014 7:31 pm

Sorry this is the code I'm using from your great site. I figured out how to turn so I could scroll my name I'm using an uno rev 3

I'm a novice but a fast learner

markgrecowork
 
Posts: 11
Joined: Sat Nov 16, 2013 1:37 pm

Re: Small 1.2" 8x8 LED Matrix w/I2C HELP SCROLLING

by markgrecowork on Sun Jan 19, 2014 7:33 pm

Again sorry turn the led figures all one way as the code turns it 90 degrees

markgrecowork
 
Posts: 11
Joined: Sat Nov 16, 2013 1:37 pm

Re: Small 1.2" 8x8 LED Matrix w/I2C HELP SCROLLING

by adafruit_support_rick on Sun Jan 19, 2014 9:07 pm

I'm not real familiar with this code, but I think you need to increase (well, decrease) the number -36 in the two loops to get more characters to scroll.
Try changing it to -72
Code: Select all | TOGGLE FULL SIZE
  for (int8_t x=0; x>=-72; x--) {
    matrix.clear();
    matrix.setCursor(x,0);
    matrix.print("Hello");
    matrix.writeDisplay();
    delay(100);
  }
  matrix.setRotation(3);
  for (int8_t x=7; x>=-72; x--) {
    matrix.clear();
    matrix.setCursor(x,0);
    matrix.print("World");
    matrix.writeDisplay();
    delay(100);
  }

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Small 1.2" 8x8 LED Matrix w/I2C HELP SCROLLING

by markgrecowork on Sun Jan 19, 2014 10:05 pm

Thanks I will try it

markgrecowork
 
Posts: 11
Joined: Sat Nov 16, 2013 1:37 pm

Re: Small 1.2" 8x8 LED Matrix w/I2C HELP SCROLLING

by Mysticforce on Fri Jun 19, 2015 4:08 pm

Hello I am using the same code as above. All I would like to do is scroll text across two of them. I got that code to work but, I have no clue how to have text scroll across two of them. please help. I set the one to x70 and the other to x71.

Mysticforce
 
Posts: 20
Joined: Thu May 28, 2015 12:47 pm

Re: Small 1.2" 8x8 LED Matrix w/I2C HELP SCROLLING

by adafruit_support_rick on Fri Jun 19, 2015 5:20 pm

I'll assume your matrices are called matrix1 and matrix2:
Code: Select all | TOGGLE FULL SIZE
  for (int8_t x=0; x>=-72; x--) {
    matrix1.clear();
    matrix2.clear();
    matrix1.setCursor(x,0);
    matrix2.setCursor(x-8,0);
    matrix1.print("Hello");
    matrix2.print("Hello");
    matrix1.writeDisplay();
    matrix2.writeDisplay();
    delay(100);
  }

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Small 1.2" 8x8 LED Matrix w/I2C HELP SCROLLING

by Mysticforce on Fri Jun 26, 2015 10:24 pm

adafruit_support_rick wrote:I'll assume your matrices are called matrix1 and matrix2:
Code: Select all | TOGGLE FULL SIZE
  for (int8_t x=0; x>=-72; x--) {
    matrix1.clear();
    matrix2.clear();
    matrix1.setCursor(x,0);
    matrix2.setCursor(x-8,0);
    matrix1.print("Hello");
    matrix2.print("Hello");
    matrix1.writeDisplay();
    matrix2.writeDisplay();
    delay(100);
  }



I get this error code:
adafruit_support_rick wrote:I'll assume your matrices are called matrix1 and matrix2:
Code: Select all | TOGGLE FULL SIZE
  for (int8_t x=0; x>=-72; x--) {
    matrix1.clear();
    matrix2.clear();
    matrix1.setCursor(x,0);
    matrix2.setCursor(x-8,0);
    matrix1.print("Hello");
    matrix2.print("Hello");
    matrix1.writeDisplay();
    matrix2.writeDisplay();
    delay(100);
  }

Arduino: 1.6.5 (Windows 8.1), Board: "SparkFun Pro Micro 5V/16MHz"

i2cscrollers:1: error: expected unqualified-id before 'for'
i2cscrollers:1: error: 'x' does not name a type
i2cscrollers:1: error: 'x' does not name a type
expected unqualified-id before 'for'

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

Mysticforce
 
Posts: 20
Joined: Thu May 28, 2015 12:47 pm

Re: Small 1.2" 8x8 LED Matrix w/I2C HELP SCROLLING

by adafruit_support_rick on Sat Jun 27, 2015 2:20 pm

Post your entire sketch.

You're not trying to run just the for loop, are you? That's just a snippet of code. You need an entire sketch.

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Please be positive and constructive with your questions and comments.