Wiring assistance, combining VS1053, Accelerometer and LED Strip
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88087
- Joined: Sat Feb 07, 2009 10:11 am
Re: Wiring assistance, combining VS1053, Accelerometer and LED Strip
Awesome! This is one for the blog
- joshuakane
- Posts: 282
- Joined: Sat Apr 13, 2013 4:40 pm
Re: Wiring assistance, combining VS1053, Accelerometer and LED Strip
Hey Bill,
I would love to do this, I have been documenting the whole process, and I would be more than willing to share it all, as well as the final code and any other information folks would find helpful. You all have been super helpful, and supportive during this project, and several others I have undertaken in the past few months.
I had another question about using the ADXL335.
http://www.adafruit.com/products/163
I have it attached to the Arduino Micro, and I loaded up the calibration sketch. I can see that the motion is registered, but what I can't figure out is how to translate this into some sort of return, or threshold to trigger an event. What I want to do is have the soundboard trigger a "Slashing" sound when the sword is moved in any direction in a deliberate fashion.
The full function I am trying to accomplish is a sound on start-up, sounds on motion, which all look highly possible reading the VS1053 documentation.
The other question I have is if it is possible to trigger a sound on shut-down, I am not sure if this is possible, or how I could best trigger a sound on both start-up and shutdown. would it be possible if the unit was powered, but start-up and shutdown were triggered by a button push such as from a toggle or maybe one of your push button breakout boards such as this one?
http://www.adafruit.com/blog/2013/06/07 ... -breakout/
Thanks,
Joshua
I would love to do this, I have been documenting the whole process, and I would be more than willing to share it all, as well as the final code and any other information folks would find helpful. You all have been super helpful, and supportive during this project, and several others I have undertaken in the past few months.
I had another question about using the ADXL335.
http://www.adafruit.com/products/163
I have it attached to the Arduino Micro, and I loaded up the calibration sketch. I can see that the motion is registered, but what I can't figure out is how to translate this into some sort of return, or threshold to trigger an event. What I want to do is have the soundboard trigger a "Slashing" sound when the sword is moved in any direction in a deliberate fashion.
The full function I am trying to accomplish is a sound on start-up, sounds on motion, which all look highly possible reading the VS1053 documentation.
The other question I have is if it is possible to trigger a sound on shut-down, I am not sure if this is possible, or how I could best trigger a sound on both start-up and shutdown. would it be possible if the unit was powered, but start-up and shutdown were triggered by a button push such as from a toggle or maybe one of your push button breakout boards such as this one?
http://www.adafruit.com/blog/2013/06/07 ... -breakout/
Thanks,
Joshua
- adafruit_support_bill
- Posts: 88087
- Joined: Sat Feb 07, 2009 10:11 am
Re: Wiring assistance, combining VS1053, Accelerometer and LED Strip
We periodically feature projects from the Adafruit community in our blog & I've forwarded your photos & video to Matt, our community support guy.
The accelerometer will register an acceleration at the onset of the slashing motion and a deceleration at the end. You could use an acceleration in the axis perpendicular to the leading edge of the sword to trigger the sound. A gyro will register a rotation for the duration of the slash and could be used to control the duration of the sound.What I want to do is have the soundboard trigger a "Slashing" sound when the sword is moved in any direction in a deliberate fashion.
Start-up is easy. Just play the sound from your setup(). Shutdown is a little trickier, but the push-button power breakout should handle it. You can have a button to trigger the sound, then write to an output pin to switch off power via the 'kill' pin on the breakout.how I could best trigger a sound on both start-up and shutdown.
- joshuakane
- Posts: 282
- Joined: Sat Apr 13, 2013 4:40 pm
Re: Wiring assistance, combining VS1053, Accelerometer and LED Strip
Thanks BIll,
I don't really care what direction or the duration is, it will trigger a single "slash" sound. So I want to trigger it off any/all motion that is more than a turn or slight movement of the wrist. I saw there was some code with the sparkle skirt, but I did not know if that would also apply to the ADXL.
Thanks,
Joshua
Is there any sample code for the ADXL?The accelerometer will register an acceleration at the onset of the slashing motion and a deceleration at the end. You could use an acceleration in the axis perpendicular to the leading edge of the sword to trigger the sound. A gyro will register a rotation for the duration of the slash and could be used to control the duration of the sound.
I don't really care what direction or the duration is, it will trigger a single "slash" sound. So I want to trigger it off any/all motion that is more than a turn or slight movement of the wrist. I saw there was some code with the sparkle skirt, but I did not know if that would also apply to the ADXL.
Are you saying that the breakout could be used for power on, and to trigger power off, I have a second button, an "off" button that triggers the sound, and a shutdown of the lights, and then "Kills" the power via the Kill pin on the breakout?Start-up is easy. Just play the sound from your setup(). Shutdown is a little trickier, but the push-button power breakout should handle it. You can have a button to trigger the sound, then write to an output pin to switch off power via the 'kill' pin on the breakout.
Thanks,
Joshua
- adafruit_support_bill
- Posts: 88087
- Joined: Sat Feb 07, 2009 10:11 am
Re: Wiring assistance, combining VS1053, Accelerometer and LED Strip
The sparkle skirt code is for a different accelerometer so reading the 3 axis is different, but the movement calculations would be similar.
The accelerometer will give you 2 peak readings: Once when the sword starts to move and again when it decelerates to a stop. During the middle part of the slash, it will not be accelerating. If you don't care about direction or magnitude, you will not be able to tell the difference between the start of a motion and the end of a motion.I want to trigger it off any/all motion that is more than a turn or slight movement of the wrist.
Yes. That should work.Are you saying that the breakout could be used for power on, and to trigger power off, I have a second button, an "off" button that triggers the sound, and a shutdown of the lights, and then "Kills" the power via the Kill pin on the breakout?
Please be positive and constructive with your questions and comments.