Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Jaime Patarroyo

Pages: [1]
Contributed Library Questions / Re: Adafruit LED Backpack library
« on: June 27, 2014, 02:38:16 PM »
After changing all the int8_t for char, the uint8_t for unsigned char, the int16_t for int and the uint16_t for unsigned int the error kept on coming. But after learning that naming variables like that was a way for keeping the code more portable I was able to track the problem.

This function that worked in Arduino:

Code: [Select]
void Adafruit_LEDBackpack::writeDisplay(void) {
  Wire.write((uint8_t)0x00); // start at address $00

  for (uint8_t i=0; i<8; i++) {
    Wire.write(displaybuffer[i] & 0xFF);   
    Wire.write(displaybuffer[i] >> 8);   

Needed some casting in Wiring:

Code: [Select]
void Adafruit_LEDBackpack::writeDisplay(void) {
  Wire.write((uint8_t)0x00); // start at address $00

  for (uint8_t i=0; i<8; i++) {
    Wire.write((uint8_t)displaybuffer[i] & 0xFF);   
    Wire.write((uint8_t)displaybuffer[i] >> 8);   

It just made me wonder about the differences between the Wire library of both projects.

Thanks Hernando for the help.
Contributed Library Questions / Adafruit LED Backpack library
« on: June 22, 2014, 08:51:03 PM »
I'm trying to get this Adafruit library ( to work with Wiring but I get an really confusing error when I try to run any of the examples. I tried compiling it in the Arduino IDE and it works fine. I'm attaching a picture of the error.

Please help!

Stand alone.

I ended up using another code (also stand alone) that worked perfectly for daisy chaining the modules. (It's attached to this message)

Matrix library didn't seemed to work…


So… I bought two of this:

And I have them connected like this:

       5V --- VCC
    GND --- GND
    PIN8 --- DIN
    PIN9 --- CS
  PIN10 --- CLK

MATRIX 1 (J2) --- MATRIX 2 (J1)
              VCC --- VCC
             GND --- GND
           DOUT --- DIN
                CS --- CS
              CLK --- CLK

First I wanted to use the Matrix library but none of the examples worked (nothing happened) even if I connected just one Matrix.

Here is the code I was using (the website example changing the pins):

#include "Binary.h"
#include "Sprite.h"
#include "Matrix.h"

Matrix myMatrix = Matrix(8, 10, 9);

void setup()

void loop()
  myMatrix.clear(); // clear display


  // turn some pixels on
  myMatrix.write(1, 5, HIGH);
  myMatrix.write(2, 2, HIGH);
  myMatrix.write(2, 6, HIGH);
  myMatrix.write(3, 6, HIGH);
  myMatrix.write(4, 6, HIGH);
  myMatrix.write(5, 2, HIGH);
  myMatrix.write(5, 6, HIGH);
  myMatrix.write(6, 5, HIGH);


Then I tried the example code given by LinkSprite in their wiki ( and it worked. But both matrix showed me the same thing.

Can anyone help me by telling where how should I change the content of the second matrix?
Or giving me any ideas to get the Matrix library to work?

I'm adding a picture of my wiring.


Website Questions / Re:
« on: July 05, 2012, 10:20:15 AM »
The schematics are in the wiki:
Programming Questions / Re: Running the program
« on: October 02, 2011, 06:00:51 PM »
I once asked for that also, but as I understand, thats something very hard to achieve. I don't know the exact reason but I think it has something to do with the time it takes to each computer to complete a task depending on the processor.
Programming Questions / Re: Running the program
« on: September 26, 2011, 11:44:34 PM »
You don't have to have the board connected when you run the software. You can even write the code and verify it without the board. You just have to plug it when you want to upload the code, but even if you try to upload it without the board attached the program won't mess up.
Pages: [1]