I have run into a problem. Generally speaking, I consider myself a fast learner; however I have recently bit off more then I can chew. I set off to build my own Disney World turnstile. For those not familiar with the new Magicband active turnstiles below is a video:
https://www.youtube.com/watch?v=GsQ19ic7_RE
What I would like to do is replicate the lighting effects:
1. Rotating ring effect during normal function, color white. Neopixel 24 LED Ring https://www.adafruit.com/products/1586
2. Subroutine activated when a RFID/NFC tag is read by a Adafruit PN532 NFC/RFID Controller Shield https://www.adafruit.com/products/789
(increasingly faster rotating white to all green burst/fade in and out) including center Neopixel Jewel https://www.adafruit.com/products/2226
3. Back to rotating effect during normal function.
I do not want to add the bio-metric finger print scanner sequence.
Any help would be greatly appreciated.
Arduino Neopixel Disney Project
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- Franklin97355
- Posts: 23910
- Joined: Mon Apr 21, 2008 2:33 pm
Re: Arduino Neopixel Disney Project
Have you checked out the learning site for ideas and tutorials on creating some of the effects you need? https://learn.adafruit.com/kaleidoscope ... a/overview
- badyear609
- Posts: 2
- Joined: Fri Apr 22, 2016 12:17 pm
Re: Arduino Neopixel Disney Project
I have, I also have one of the three lighting effects down. I would like to first nail down the LED portion of my project before tackling the RFID portion.
The issue I am having is the second LED step where I would like the rotation of the LEDs to become increasingly faster (making approx.
6-7 rotations around the ring) before step 3. Which would be a burst/fade in and out of the 24 Neopixel ring and a separate Neopixel jewel (not sure if I have to wire to a different Pin Out). The show would then loop back to step 1.
Below is the sketch I have for the first step. I adapted a sketch I found on one of the forums and was able to reverse the rotation from a clockwise to a counterclockwise rotation, although there is some jitter on every the 12th rotation.
"Normal" rotating function
The issue I am having is the second LED step where I would like the rotation of the LEDs to become increasingly faster (making approx.
6-7 rotations around the ring) before step 3. Which would be a burst/fade in and out of the 24 Neopixel ring and a separate Neopixel jewel (not sure if I have to wire to a different Pin Out). The show would then loop back to step 1.
Below is the sketch I have for the first step. I adapted a sketch I found on one of the forums and was able to reverse the rotation from a clockwise to a counterclockwise rotation, although there is some jitter on every the 12th rotation.
"Normal" rotating function
Code: Select all
#include "Adafruit_NeoPixel.h"
#define PIN 6
const int FADE_LENGTH = 6;
const int FADE_SCALE = 120;
const int RING_SIZE = 24;
Adafruit_NeoPixel strip = Adafruit_NeoPixel(RING_SIZE, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
strip.begin();
strip.begin();
strip.show(); // Initialize all pixels to 'off'
}
void loop () {
for ( int i=0 ; i < RING_SIZE *5 ; i-- ) {
for ( int p=0 ; p < RING_SIZE ; p++ ) {
strip.setPixelColor( p, 0 ); // clear the strip
}
drawFade( i,150, 150, 150); // then draw the fade
strip.show();
delay(80);
}
}
void drawFade ( uint8_t start, uint8_t r, uint8_t g, uint8_t b ) {
int brightness = 255;
for ( int p=0 ; p < FADE_LENGTH ; p++ ) {
strip.setPixelColor(
( start + p ) % RING_SIZE,
strip.Color(
( r * brightness ) / 255,
( g * brightness ) / 255,
( b * brightness ) / 255
)
);
brightness = ( brightness * FADE_SCALE ) / 255;
}
}
- adafruit_support_bill
- Posts: 88090
- Joined: Sat Feb 07, 2009 10:11 am
Re: Arduino Neopixel Disney Project
Check the "spinUp()" function from this project:I would like the rotation of the LEDs to become increasingly faster (making approx.
6-7 rotations around the ring)
https://learn.adafruit.com/steam-punk-goggles/overview
- Hotshot7997
- Posts: 276
- Joined: Fri Jul 18, 2014 2:27 am
Re: Arduino Neopixel Disney Project
@badyear609 Did you ever figure this out? I am looking to do this too and find it awesome I am not the only one. I am going to have the RFID connected to a Raspberry PI to play a video when triggered.
- Hotshot7997
- Posts: 276
- Joined: Fri Jul 18, 2014 2:27 am
Re: Arduino Neopixel Disney Project
@Bill,
I have sooo many projects on the table and this is one of the many that are set to join into one massive project. I have reviewed the examples provided and I'm still confused how this all communicates. Ever time I plug in a part of the code from the goggles project it will freak out and not do as I intended.
I am looking for two simple animations.
One of which is chase with a tail of 3 or 4 pixels max then when a pin goes high it will spinup and at the high point of the spin slow pulse green. So far I got nothing working correctly. I'm a HW guy not SW and I'm trying hard to code bend. Any ideas?
I have sooo many projects on the table and this is one of the many that are set to join into one massive project. I have reviewed the examples provided and I'm still confused how this all communicates. Ever time I plug in a part of the code from the goggles project it will freak out and not do as I intended.
I am looking for two simple animations.
One of which is chase with a tail of 3 or 4 pixels max then when a pin goes high it will spinup and at the high point of the spin slow pulse green. So far I got nothing working correctly. I'm a HW guy not SW and I'm trying hard to code bend. Any ideas?
- adafruit_support_bill
- Posts: 88090
- Joined: Sat Feb 07, 2009 10:11 am
Re: Arduino Neopixel Disney Project
If you post what code you have so far and describe the problems you are having, we might be able to point you in the right direction.
The spinup, spindown and spin functions from the goggles project should drop-in mostly as-is. You can delete the references to 'pos' and the 'momentum' variables, since you will not be using the physics engine.
The spinup, spindown and spin functions from the goggles project should drop-in mostly as-is. You can delete the references to 'pos' and the 'momentum' variables, since you will not be using the physics engine.
- Hotshot7997
- Posts: 276
- Joined: Fri Jul 18, 2014 2:27 am
Re: Arduino Neopixel Disney Project
@Bill,
I will compile what I have so far and put it in here over the weekend. Thank you and we will revisit this in a few.
I will compile what I have so far and put it in here over the weekend. Thank you and we will revisit this in a few.
- Hotshot7997
- Posts: 276
- Joined: Fri Jul 18, 2014 2:27 am
Re: Arduino Neopixel Disney Project
@Bill
I was trying to load up the goggles code but I am having so much trouble trying to get it to work. I am now in costa rica and do not have access to my computer at home I use top code. So that I do not waste time these next two weeks in the BANNED I need some help. So I am using the playground and trying to make this work.
Chase at low speed(white). when a pin goes high its speeds up(white) like the goggles and pulsates green.
Below is the error I am getting. I am not sure what I am missing I thought I have loaded all libraries but I seem to be missing them from the list.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Andres\Documents\Arduino\sketch_oct10a\sketch_oct10a.ino:11:31: fatal error: Adafruit_LSM303_U.h: No such file or directory
#include <Adafruit_LSM303_U.h>
^
compilation terminated.
Multiple libraries were found for "Wire.h"
Used: C:\Users\Andres\AppData\Local\Arduino15\packages\adafruit\hardware\avr\1.4.9\libraries\Wire
Not used: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire
exit status 1
Error compiling for board Adafruit Circuit Playground.
I was trying to load up the goggles code but I am having so much trouble trying to get it to work. I am now in costa rica and do not have access to my computer at home I use top code. So that I do not waste time these next two weeks in the BANNED I need some help. So I am using the playground and trying to make this work.
Chase at low speed(white). when a pin goes high its speeds up(white) like the goggles and pulsates green.
Below is the error I am getting. I am not sure what I am missing I thought I have loaded all libraries but I seem to be missing them from the list.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Andres\Documents\Arduino\sketch_oct10a\sketch_oct10a.ino:11:31: fatal error: Adafruit_LSM303_U.h: No such file or directory
#include <Adafruit_LSM303_U.h>
^
compilation terminated.
Multiple libraries were found for "Wire.h"
Used: C:\Users\Andres\AppData\Local\Arduino15\packages\adafruit\hardware\avr\1.4.9\libraries\Wire
Not used: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire
exit status 1
Error compiling for board Adafruit Circuit Playground.
- adafruit_support_bill
- Posts: 88090
- Joined: Sat Feb 07, 2009 10:11 am
Re: Arduino Neopixel Disney Project
That is for the LSM303 accelerometer/magnetometer used in the goggles project. The library is here: https://github.com/adafruit/Adafruit_LSM303DLHC
If you are not using an accelerometer, you need to delete all the references to it.
If you are not using an accelerometer, you need to delete all the references to it.
- Hotshot7997
- Posts: 276
- Joined: Fri Jul 18, 2014 2:27 am
Re: Arduino Neopixel Disney Project
Is their an easy way to find all references to remove them? I have tried to delete lines that show up errors when compiling but it will still fail to work.
- adafruit_support_bill
- Posts: 88090
- Joined: Sat Feb 07, 2009 10:11 am
Re: Arduino Neopixel Disney Project
There are these two lines at the beginning of the file:
Plus all references to "accel", "mag", "pos", "heading" or "event". That means pretty much 80% of the sketch. That whole sketch is built around the physics engine. It would probably be simpler to start with your own sketch and just borrow the 'spin' functions that you need.
Code: Select all
Adafruit_LSM303_Accel_Unified accel = Adafruit_LSM303_Accel_Unified(54321);
Adafruit_LSM303_Mag_Unified mag = Adafruit_LSM303_Mag_Unified(12345);
- Hotshot7997
- Posts: 276
- Joined: Fri Jul 18, 2014 2:27 am
Re: Arduino Neopixel Disney Project
So I had a lot happen in the last month with the trip and stuff. I had another project take over which I thankfully finished. I am 1mo away from this now and I attempted to mess with the code again and I tried to remove those lines and anything else that talks about it but still no luck. I cannot fail or change plans. Only things I have left to do is the pixel ring and the PI with RFID. I have already completed the Feather fona unit to reply to key words with a text message.
- adafruit_support_bill
- Posts: 88090
- Joined: Sat Feb 07, 2009 10:11 am
Re: Arduino Neopixel Disney Project
It will be much simpler to start with your own sketch and just borrow the 'spin' functions that you need.
- Hotshot7997
- Posts: 276
- Joined: Fri Jul 18, 2014 2:27 am
Re: Arduino Neopixel Disney Project
I'll give it another go after I am done with the RFID project. I am working on the plan B right now where Pi is no longer in the equation and its only audio the grooms men are going to hear. sucks but I'm running into too many issues and I have no knowledge of python. I have a coworker who will look into it for me but I am not going to put all ,my eggs in the basket this late in the project.
Please be positive and constructive with your questions and comments.