Home Forums Game Frame Technical Support pixel order question for DIY gameframe

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #2088
    aromano
    Participant

    Hi,

    I am building my own game frame. I am getting read to solder up my display and I am wondering where you have the led chain start…if you are looking at the front of the gameframe is LED 0 at the Top Left , Top Right, Bottom left or bottom right? I dont want my text and things to end up being backwards or upside down.

    Thanks Alot !

    #2089
    Jeremy WilliamsJeremy Williams
    Keymaster

    I’m on the road at the moment but as I recall it starts at the upper right. In any case, as long as you start at an upper corner it’s an easy code change to swap between them.

    #2090
    aromano
    Participant

    ok… I just didn’t want to do all this soldering and find out all my images are backwards lol but so far I got everything loaded on to my Arduino and talking with the sd card along with the ini files… I think it will be smooth sailing for me.. thanks for developing and providing all the source code !

    #2100
    aromano
    Participant

    so my images are backwards and I can’t seem to find a line of code to mirror the image… can you help me out?

    #2102
    Jeremy WilliamsJeremy Williams
    Keymaster

    Yeah, you want to edit the getIndex function. Let me know if you need more help.

    #2103
    aromano
    Participant

    I was able to apply the code that I found on here from another guy doing a DIY build … It’s all working great!

    BTW Thanks a ton for selling the game frame SD contents … I just got it with Paypal ! I mean, you basically gave us everything else for free might as well pay for something right ? lol

    …I’m hoping to sneak some more code into it so I can use one of those cheap o arduino IR remote in addition to the two buttons … Do you think there will be enough memory ?

    #2104
    Jeremy WilliamsJeremy Williams
    Keymaster

    Probably not enough memory for IR code unless you switch to a fatter microcontroller like the Teensy. More importantly, IR doesn’t get along well with these particular LEDs (WS2812). IR libraries employ pin interrupts to receive remote signals. Unfortunately, to meet the LED timing requirements, the Arduino suspends its interrupts while light data is being sent.

    #2105
    aromano
    Participant

    hmm plan b…

    I guess I’m just going to have to use another Arduino just for IR that can control a npn on the button circuit so I have a remote lol and if digitalread won’t work right with a transistor lol I can just use mechanical relays lol at least they will sound cool … second thought, mechanical relays for the cool factor lol

    #2106
    Jeremy WilliamsJeremy Williams
    Keymaster

    You can use another Arduino to handle the IR, but I’d suggest sending data to the main Arduino using the HardwareSerial library. Serial has a small buffer that can store input data even while interrupts are disabled. I’ve done this on a prototype and it works well.

    #2107
    aromano
    Participant

    Thanks good to know… I will do that … It’s nice to get advice from someone who knows much more about programming that I do lol

    #2108
    Jeremy WilliamsJeremy Williams
    Keymaster

    Come to think of it, I was using Teensy for that prototype. I can’t find any information on whether Arduino Uno (ATMEGA328) serial input is buffered when interrupts are disabled, so good luck and let me know how it goes.

    #2527
    avs.stolyarovavs.stolyarov
    Participant

    Try to change the getIndex routine like this (TOP-LEFT, ZIG-ZAG):

    byte getIndex(byte x, byte y)
    {
      byte index;
    if (y % 2 == 1){
             int rawIndex = (x + (y * 16));
             int begin = y * 16;
             int end = (y * 16) + 15;
             index = end - (rawIndex - begin);
          }
          else{
              index = x + (y * 16);
           }
      return index;
    }
Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.