Home Forums Game Frame Firmware Modding Gameframe 2 with neopixels

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2544
    twuelfing
    Participant

    Hi all, I have done some searching and can’t find anything where someone else is having the issue i am having.

    I am building a gameframe from scratch as a learning project. Well not entirely from scratch, i purchased the art because its great!
    I had a bunch of Adafruit neopixels laying around from a previous project.

    I purchased the following

      teensy 3.2
      a 3231 RTC board
      a microsd board
      an ir reciever and an ir remote

    all from adafruit.

    i have all the libraries in place and can successfully upload the code from the github repository to the teensy 3.2, kudos to jeremy by the way on some great code!

    when i start to modify the code to use neopixels, ws2812 RGB leds, i get a ton of errors related to fastled
    i also see there is a clockpin associated with the LEDS in the code, but the neopixels dont have a clock pin.

    I attached a screen grab of the errors

    I have been pulling my hair out messing with this.
    Can anyone offer assistance as to how to switch the code over to run on a string of neopixels? Any support that would help me learn about this stuff would be amazing.

    I have 3d printed 256 little diffusers, a grid, soldered all the LEDS up.
    I feel like i am so close on this, but i am just a little bit too ignorant about arduino coding.

    Thanks a ton in advance for any advice.

    i have attached a pic of the project so far in case anyone is curious.

    Attachments:
    You must be logged in to view attached files.
    #2547
    Jeremy WilliamsJeremy Williams
    Keymaster

    Game Frame 2 uses APA102C LEDs (Adafruit calls them DotStar). Unfortunately NeoPixels are not compatible with the IR receiver since they tie up the system interrupts in order to meet their exact timing.

    That said, you should be able to get it working with NeoPixels at the expense of the IR working properly. Look for a FastLED example using WS2812 to see the syntax on how to init them.

    #2548
    twuelfing
    Participant

    ahh, well then i should likely revert to gameframe 1 code and ditch the IR control.
    no biggie. I will work on getting that up and running as it seem like it will be more straight forward. Then i can tinker with the version 2 with the IR stripped out.

    thanks a ton for the info and pointing the way!
    Keep making awesome stuff!

    I will be sure to post some pics when / if i get it working.

    if you like checking out fun projects, particularly ones full of LEDs here is my last one. I spent a year on the designing, 3D printing, and painting. My buddy did the code for raspberry pi, which is what got me into learning the code end of all this.
    https://www.youtube.com/user/twuelfing

    thanks again!

    #2549
    Jeremy WilliamsJeremy Williams
    Keymaster

    The first Game Frame ran on Arduino Uno, not Teensy. I think you’re better off just getting NeoPixels working. It should be a simple matter of running the right Init.

    Trying changing this line:
    FastLED.addLeds<LED_TYPE, DATA_PIN, CLOCK_PIN, COLOR_ORDER>(leds, NUM_LEDS).setDither(0);

    To this:
    LEDS.addLeds<WS2812,DATA_PIN,COLOR_ORDER>(leds,NUM_LEDS).setDither(0);

    #2550
    twuelfing
    Participant

    Awesome! that did the trick. So after reading a bit about the APA102C leds it makes me wish i didnt have 1000 WS2812 leds lying around. Looks like an APA102 that is RGBW would be an awesome solution.

    remote high five for the help!

    I had to mess around with the version of sdfat I used but it seems to compile now.
    looks like tomorrow is breadboard fun day!

    BTW, I am excited to see what you do with the VR pinball stuff! looks like lots o fun!

    thanks so much

    #2554
    twuelfing
    Participant

    As i was wrapping my head around the code (poorly) i had a couple questions that are likely trivial for someone more knowledgeable than me.

    1. I don’t see any pin definitions for the SD card to for the MOSI and MISO (data I/O) am i missing something or can they just be on pins 11 and 12 of the Teensy 3.2?

    2. I read the Teensy 3.2 has a built in RTC, does this mean i can omit the external RTC? if needed, can the RTC’s SDA and SCL just be on pins 16-17 or 18-19? how does it know where you have hooked these things up if they aren’t defined in the code?

    boy the teensy platform crams a lot of capability in a super tiny form factor. I had never even heard of this thing before I started this project.

    I apologize if my questions seem silly, but I am learning so I often have silly questions.
    I will keep reading and scouring the interweb for clarity on this, but I really appreciate any help from anyone willing to take the time. 🙂

    #2555
    Jeremy WilliamsJeremy Williams
    Keymaster

    1) Yes, pins 11 and 12. The SPI pins are hard wired so the library doesn’t expect you to assign them.

    2) It does have a built-in RTC but not a crystal so you’d need to solder one to the appropriate through holes and mess with the Time code to use the Teensy RTC instead. It also won’t be nearly as accurate as the DS3231.

    As for pins, the DS3231 communicates via I2C which, like SPI, is hard wired (SDA & SCL). EDIT: These are pins 18 & 19. That is the primary default I2C address.

    #2556
    twuelfing
    Participant

    sweet, your the best!
    I will post up some pics when i get this thing together.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.