Greetings, It's almost Halloween! and I was thinking it would be really cool to make a steampunk portal gun. Something like an old west, double barrel, over under shotgun. Each barrel would be a different portal color so I tinkered with my Iphones led, some plastic treasure crystals and some PVC pipes. I then though it would be better to use RBG-LEDs so i can change it up. after lots of thinking and discussions with my friends and father i decided that i wanted to instead make a portal flashlight.
I just purchased a 12 neopixel ring and a lighted power switch to use with my arduino nano clone (dont judge, i don't want to use my real arduinos inside this thing if it gets lost, stolen or broken) I'm going to fashion a flashlight shaped body out of PVC pipe and fittings. The neopixel ring will act as the light in the front where you can see the different portal colors. on the butt of the flashlight will be mounted the lighted power switch where the light will indicate which mode (lord willing) the device is in. then there will be a momentary button placed where a traditional power button would be placed to control the device
my main question is: is it even possible to have multiple modes set to execute depending on how the button is pushed?
(example: when you turn power on, it goes directly in to stand by, where the ring is off and the power led is acting like a Mac in standby. if you single click it, the ring turns to blue and if you click it again the ring turns to orange>click blue> click Orange,,,ect. But when you double click it, it goes back into standby. Or hold the button for 3 seconds to turn the ring bright white so it can actually be a flashlight)
if so, where do i even start on figuring out how to wire this thing up?
Thank You
-Kevin
Portal Gun, No Idea What im doing...
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88092
- Joined: Sat Feb 07, 2009 10:11 am
Re: Portal Gun, No Idea What im doing...
Yes it is possible. Using a single click to cycle between modes is fairly straightforward. Things like double-clicks and click & hold are slightly trickier, but not rocket science either.is it even possible to have multiple modes set to execute depending on how the button is pushed?
This is a good place to start for neopixels:if so, where do i even start on figuring out how to wire this thing up?
http://learn.adafruit.com/adafruit-neopixel-uberguide
There are dozens of ring projects to look at for wiring diagrams: https://learn.adafruit.com/search?q=neopixel+ring
This is a good one: https://learn.adafruit.com/kaleidoscope ... nket-gemma
- KMSCoring
- Posts: 15
- Joined: Thu Oct 09, 2014 11:01 pm
Re: Portal Gun, No Idea What im doing...
Thank You for the quick reply!. I've been looking through the projects and reading the code examples and i am not making any headway on how to understand how to control the behavior of the lights. so far I've managed to change the colors in the simple sketch so i guess that's progress!!!
i believe i may have a defective nano clone so using it might not be an option, i am prepared to take the ATMega328 off of my uno and make its own small board that will fit into my project. I am not sure if the PWM pins need the rest of the arduino or not to work? ill try to play around a bit more with the nano. is there a way to program it remotely through my uno?
also, i'm planning on using a 9v battery with an L7805CV voltage regulator to drop it the the required 5 volts. would you recommend anything else or different?
i believe i may have a defective nano clone so using it might not be an option, i am prepared to take the ATMega328 off of my uno and make its own small board that will fit into my project. I am not sure if the PWM pins need the rest of the arduino or not to work? ill try to play around a bit more with the nano. is there a way to program it remotely through my uno?
also, i'm planning on using a 9v battery with an L7805CV voltage regulator to drop it the the required 5 volts. would you recommend anything else or different?
- adafruit_support_bill
- Posts: 88092
- Joined: Sat Feb 07, 2009 10:11 am
Re: Portal Gun, No Idea What im doing...
You might want to consider the Trinket Pro. it is a very compact Atmega-328 processor: https://www.adafruit.com/product/2000i am prepared to take the ATMega328 off of my uno and make its own small board that will fit into my project.
No. The 328 pins are brought straight out to the headers.I am not sure if the PWM pins need the rest of the arduino or not to work?
Not sure. Haven't played with a Nano.ill try to play around a bit more with the nano. is there a way to program it remotely through my uno?
9v batteries are not good in high-drain applications like this. This guide explains a bunch of battery options: https://learn.adafruit.com/battery-powe ... s/overviewalso, i'm planning on using a 9v battery with an L7805CV voltage regulator to drop it the the required 5 volts. would you recommend anything else or different?
- KMSCoring
- Posts: 15
- Joined: Thu Oct 09, 2014 11:01 pm
Re: Portal Gun, No Idea What im doing...
Thank you!.
I switched to a usb port of the rear of my computer and i was able to program my nano!.
i also got in contact with a programmer friend of mine from college and he is willing to help me out in with the coding!!
my last question, since you are AMAZingly Helpful, is:
as i read through the battery guide i decided that running 4 duracell AAs through one of my power converters would be best because i have lots of them and no diodes. I want to wire a second button straight from 3.3v pin, then to a 1w super bright LED (same one they made the bike light with) would that be too much drain on the device?
I switched to a usb port of the rear of my computer and i was able to program my nano!.
i also got in contact with a programmer friend of mine from college and he is willing to help me out in with the coding!!
my last question, since you are AMAZingly Helpful, is:
as i read through the battery guide i decided that running 4 duracell AAs through one of my power converters would be best because i have lots of them and no diodes. I want to wire a second button straight from 3.3v pin, then to a 1w super bright LED (same one they made the bike light with) would that be too much drain on the device?
- adafruit_support_bill
- Posts: 88092
- Joined: Sat Feb 07, 2009 10:11 am
Re: Portal Gun, No Idea What im doing...
Your LED needs about 300mA. The 3.3v pin is not designed to source that much current. You could use one of these to get a good 3.3v supply direct from the battery pack. https://www.adafruit.com/product/1066
- KMSCoring
- Posts: 15
- Joined: Thu Oct 09, 2014 11:01 pm
Re: Portal Gun, No Idea What im doing...
/sigh.... I'm back.
I ended up burning out my neopixel ring so I, just this evening, ordered 3 more 12 neopixel rings.
I noticed I couldn't find the capacitor that you recommend to use between power and ground on your site.
Is that something I can order? I don't mind paying a little extra if someone could slip a few in my box before it ships.
I ended up burning out my neopixel ring so I, just this evening, ordered 3 more 12 neopixel rings.
I noticed I couldn't find the capacitor that you recommend to use between power and ground on your site.
Is that something I can order? I don't mind paying a little extra if someone could slip a few in my box before it ships.
- adafruit_support_bill
- Posts: 88092
- Joined: Sat Feb 07, 2009 10:11 am
Re: Portal Gun, No Idea What im doing...
The capacitors are not absolutely essential for battery powered projects. We do highly recommend them for projects powered by plug-in power supplies to suppress any possible power-on spikes.
We do not have the 1000uF capacitors in the store. The exact value is not so critical. You should be able to find something close at a RadioShack.
We do have a 4700uF which is quite a bit bigger - https://www.adafruit.com/products/1589
We do not have the 1000uF capacitors in the store. The exact value is not so critical. You should be able to find something close at a RadioShack.
We do have a 4700uF which is quite a bit bigger - https://www.adafruit.com/products/1589
Please be positive and constructive with your questions and comments.