loading

Step 10: Auxillary: GlovePie Script

This is the script I wrote the work with Mixx and GlovePie. Many thanks to Carl Kenner, the creator of GlovePie and the creators of Mixx. Granted, I'm positive this code can be greatly cleaned up, but it works and is quite fun to play with. Post back here if you have problems with the code or programs.

Again, the controls are:

  • Volume: Hold down A- vertical tilt is up/down and swinging up/down moves it fast to some degree of accuracy.
  • Speaker Balance: Hold down B- swing left/right
  • Track Speed: D-Pad left and right
  • Play Track One/Two- D-Pad Up and Down
  • Momentary Bass Boost- (for flame jump) The "1" Button

\\\\\\\\\\\\Code Begins Now\\\\\\\\\\\\\\\\\\\

pie.FrameRate= 600Hz
debug = "angle="+Wiimote.pitch

/*An attempt to fling volume up and down quickly with gestures.
works okay but needs some refinement*/

var.MoveUp = Wiimote.RelAccy > 7, Wiimote.RelAccy < -7
var.MoveDown = Wiimote.RelAccy < -7, Wiimote.RelAccy > 7

if (wiimote.A= true) and (keepdown(var.MoveUp=true,700ms)) then
key.p=true
wait 1ms
key.p= false
endif

if (wiimote.A= true) and (keepdown(var.MoveDown=true,700ms)) then
key.l=true
wait 1ms
key.l= false
endif

//Gradual Volume up/down

if ( 0 < wiimote.Pitch) and (wiimote.A=true) then
key.P = true
wait 50ms
key.p= false
endif

if ( 0 > wiimote.pitch) and (wiimote.A=true) then
key.l =true
wait 50ms
key.l=false
endif

//rate of music and if sine wave, make scroll by varying pitch

if keepdown(wiimote.Left=true, 120ms)
key.F1=true
wait 40 ms
key.F1=false
endif
if keepdown(wiimote.Right=true, 120ms)
key.F2=true
wait 40 ms
key.F2=false
endif

//Bass Jump for Flame Jump
if pressed(Wiimote.1) then var.PressTimes = 30
if var.PressTimes > 0 then
Press key.c
wait 1ms
Release key.c
var.PressTimes = var.PressTimes - 1
endif

if released(Wiimote.1) then var.PressTimes2 = 30
if var.PressTimes2 > 0 then
Press key.x
wait 1ms
Release key.x
var.PressTimes2 = var.PressTimes2 - 1
endif

//Play start/stop
key.d= wiimote.up
key.b=wiimote.down

//Left and Right Balance- Swinging

var.MoveRight = Wiimote.RelAccX > 9, Wiimote.RelAccX < -9
var.MoveLeft = Wiimote.RelAccX < -9, Wiimote.RelAccX > 9

if (wiimote.B= true) and (keepdown(var.MoveRight=true,300ms)) then
key.M=true
wait .5ms
key.M= false
endif

if (wiimote.B= true) and (keepdown(var.Moveleft=true,300ms)) then
key.n=true
wait .5ms
key.n= false
endif

/*Resetting the balance, if all the way left or right, plus
and minus reset the balence to center respectively. I debated
using the multiple press variable as used in the Bass jump, but
the code ended up being longer and more complex than this...which
does the job.
*/

if (pressed(wiimote.Minus)) and (wiimote.B=true) then
press key.n
wait 1ms
release key.n
press key.n
wait 1ms
release key.n
press key.n
wait 1ms
release key.n
press key.n
wait 1ms
release key.n
press key.n
wait 1ms
release key.n
endif

if (pressed(wiimote.Plus)) and (wiimote.B=true) then
press key.M
wait 1ms
release key.M
press key.M
wait 1ms
release key.M
press key.M
wait 1ms
release key.M
press key.M
wait 1ms
release key.M
press key.M
wait 1ms
release key.M
endif

\\\\\\\\\\Code Ends Now\\\\\\\\\\\\\\\\\
Excellent article, and kudos on the great photos too, mate. Also check out this article that details the seriousness and danger involved with fixing <a href="http://www.propaneregulator.net" rel="nofollow">propane regulator</a> problems - I'm glad I did!
Yay for Blue Man Group!
We made this over last weekend for event coming up have few improvements to make but very nice.<br><iframe frameborder="0" height="390" src="http://www.youtube.com/embed/ggRxNK_BKTA" title="YouTube video player" width="640"></iframe><br><br>Its 9 feet hight with 150 hold 2mm wide drilled ever 1.5mm in staleness steel. <br><br>For more videos and to see other revisions, http://www.tog.ie/ <br><br>
It looks like the bellagio fountains at night :-)
instead of pvc could i just use metal end caps, brass fittings, and whatnot?
about what is the life of one of the propane cans when used for this?
What exactually is this for?
I don't know if it's been mentioned already, but I think you got the nodes and anti-nodes backwards in the intro (as far as i can remember from physics class last month). Nodes are low pressure points and anti-nodes are the points in between the nodes. Otherwise, nice Instructable. <a href="http://hyperphysics.phy-astr.gsu.edu/hbase/waves/funhar.html#c3" rel="nofollow">http://hyperphysics.phy-astr.gsu.edu/hbase/waves/funhar.html#c3</a>
Instead of a straight pipe, would a curved tubing work? or square (might not with that one) but i was thinking about covering a good frequency range and coiling it and placing it into my fire place.
I had thought about this before and hadn't originally thought it would work thinking the effect was solely determinant of the cylindrical shape of the tube. However, in researching to find the original journal article written by Heinrich Rubens, I stumbled upon two articles written by Harold Daw. One was written in 1986 when he was at New Mexico State University and a follow up of the work they did on "Flame tables" in 1991. They were in different triangular, circular, or just square shapes. It was rather interesting reading. So in a concise and not drawn out explanation, yes.
that sort of research sounds fascinating. don't suppose you could do a link dump here, or pass on some recommended reading? I've recently decided to get into all of this wonderful Victorian era science.
cool, have you tried different size speakers, like a small simple headphone speaker? since all i've seen are ones that use larger speakers and vent tubing... although yours uses smaller tubing which is cool, but desktop speakers.
I had tried other speakers in the past, but really these desktop speakers can be too much for the tube. Those specific ones were choses because of their cost and great fit into the pvc cap. If I turn the volume on these up past even 1/2 the way, the flames get to large/distorted to produce a decent effect. Keep in mind that the original tube built by Heinrich Rubens only used tuning forks, bells, or organ pipes placed next to a rubber membrane on one end of the tube to drive sound waves. Good luck!
I may be interpretting you wrong, but it sounds like you're thinking that a longer tube will give you a greater frequency range, right? Actually, the frequency <em>response</em> is affected by the length of the tube, but not the frequency range per se, because it isn't a spectrograph, it's just showing the areas of constructive and destructive interference. So there is some fundamental frequency which is a function of the speed of sound in the devices environment and the length/shape of the tube. Then any harmonics of that frequency will also create pretty patterns on the tube. So a longer tube will show you more (higher frequency) harmonics. Perhaps that's what you mean by frequency range. If so, then disregard this comment, but just checking.<br/>
I wonder if the effect would be more grand if you were to use a 6" pipe 10' long with 1/8 " or maybe 3/16 " holes and a 6" 2-way speaker a propane tank from a grill with a larger supply line , and a electric igniter to remotely light the gas , with a electric soleniod valve to turn the gas on and off . any thoughts ?
In general, a larger diameter tube does seem to produce a greater effect. As it is now, only with a length of 4' or so, there is a slight unevenness in flame response close versus far from the speaker. The larger diameter seems to equalize that, and as long as you made the diameter sufficiently large, I'm sure 10' would look great . The problem therein lies in finding a speaker with the right diameter to fit the tube or otherwise building a funnel to adapt speaker size- I didn't have much luck with it but thats not to say others wouldn't. More gas flow unfortunately doesn't make it look better but rather worse. There's a 'sweet spot' so to speak when the flames are only maybe 1"-2.5" high... (for this size at least... with bigger tubes it's probably more). Once it's above that, the effect increasingly diminishes.
<a rel="nofollow" href="http://www.instructables.com/files/deriv/FTL/JIRK/F5HVTEDD/FTLJIRKF5HVTEDD.MEDIUM.jpg">Chart from other Indstructable</a><br/><br/>the chart above from another instructable that was posted shows length versus frequency.... sorry just off from 10hr work day an not thinking right mind, but yeah what you said was what i was asking.<br/>
so friggin cool!
Amazing Instructable.&nbsp; Cool build, clear explanation, and well-researched background info.&nbsp; Extra points for digging up Rubens' original work AND&nbsp;the haiku!<br /> <br /> 5 stars, my man.<br />
Could you make a video with the music patched in directly to the tape? The echoy nature of the space you performed in kind of interfered with interpreting the effect of the music on the flames. Not that I'm complaining, it would just be very neat to see the effects with a proper soundtrack (kinda like the &quot;Wizard of Winter&quot; video with the christmas lights).<br/><br/><div style="margin-left:15px;"> <object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/rmgf60CI_ks"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/rmgf60CI_ks" type="application/x-shockwave-flash" width="425" height="344" wmode="transparent"></embed></object></div><br/>
now imagine that was ur neigbor, going to bed with that every night,&nbsp; itll be cool for tghe firs five seconds
holy shamoley
&nbsp;I love the safety haiku!
We really want to build this, but the pages that are linked for the wii are down. Any reccomendations?
whats better # Galvinized # Steel # PVC # Aluminium irrigation pipe to use for tubing
do not use pvc it will melt. galvanized will create a stinky chemical reaction do not use. aluminum is cheap but idk if it will work. steel works.
But aluminum does have the lowest melting temp (around 1200 degrees) and steels is in the 2,000's
hmm,no video showing at least the flame...Add a video and also dont add it from youtube just an .avi file
Good experiment_ What is the dimensions you used for the tube...... And the material, from what I've seen and heard galvinized pipe should explode in this experiment. Can you please tell me what material you used???
that was a lot of fun to build. thanks for the great instructable.
screw controlling fire i think you just invented the new electric instrument that requires body movement try hacking the wiimote and making it look diffrent and sell the thing and you will become rich
Fantastic. I need a wii and a Ruben's tube for that matter!!
Try Golden Slumbers by the Beatles, Baba O Riley by the Who, or Sow by Red Hot Chile Peppers they all work really well with a Rubens Tube.
So I just got a prototype working with 1/2&quot; copper pipe and a funnel design, I'm ganna expand on it a little more, but it works:<br/><div style="margin-left:15px;"> <object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/tI5S_Z-cZg8"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/tI5S_Z-cZg8" type="application/x-shockwave-flash" width="425" height="344" wmode="transparent"></embed></object></div><br/>
Just out of curiosity, is this something that you could indeed run for a long period of time without worries or are you limited to 5-10 minute durations?
The original designs would heat up too much and melt the connecting pvc when other tube materials were used. With the aluminum irrigation pipe, siliconed in fittings however, I've run the tube for around 30 minutes before. It will heat up quite hot, but seems quite fine afterwards. I'm not sure if I would recommend extended durations, but I see no problem with it assuming you take the necessary precautions and/or use a different end cap than pvc.
Well, what fun that was. Here's what I did (and perhaps you can help me troubleshoot). My local hardware store only had a 1 7/8" galvanized pipe (and end pipe for chain link fencing) so that's what I was working with. The pipe is 6' 6" long and I left it at that length. Per instructions I started 6" from one end and went up to the 48" mark for a total of 81 holes. This left about 2 feet to the other end. I found a PVC sleeve that slipped over the ends of the pipe and on one side affixed a loose speaker the same diameter (just a touch larger actually) and the other end had the req'd reducers to the fuel line with a drilled out nozzle on the regulator. Inlet on 24" end / speaker on 6" end resulted in decent effect but nowhere near as pronounced. Inlet on 6" end / speaker on 24" end resulted in little to no effect. I suspect two things: One - the speaker not only may be too weak (especially when not enclosed in it's factory casing) but I believe the multimedia setup with subwoofer incorporates a crossover to limit the frequencies passed to the satellite speaker I used; and Two - perhaps my pipe diameter is too small or the excess on the end is too great. Any pointers? I'm close but still far somehow. My apologies if this is not the forum for this.... Thanks for a fun night in the workshop BTW.
Sounds like you made a time of it! Pointers? Sure! A couple things to look for that I suspect may be giving you trouble: As a general rule of thumb, it seems that the longer the pipe, its diameter needs to increase a bit as well. If not, you get a "lopsided" effect where one end might respond too big and the other not at all. So I might try a shorter tube if you'll stick with that diameter. Also, what were you trying to play through it? Start with a simple sign wave to test as a lot of times the music can be too "busy" to give you an idea if it's working or not. When you light the tube without the sound on, can you get an even flame about 1-1.5" on all the holes? If not, start shooting for that. Most of the time when you can't get a good effect either you have TOO much gas going into the tube or the sound is up TOO high. You'll hit a "sweet spot" for your particular tube and materials at some point. Let me know how it goes and good luck!
.....Playing with fire AND a Wiimote at the same time....a dream come true ! A +++ Almost forgot: tried with some psychedelic like Pink Floyd ? They have long standing notes which should add a lot to the effect. Best wishes
Haven't tried any Pink Floyd yet. Any favorite songs?
Of course I do ! The beginning of Echoes (from Meddle) should look great. The room MUST be lit by the fire only. Also anything from The dark side of the moon should be equally excellent. Oh, almost forgot, Wish you were here (the song I mean). Well, you got it : anything from PF would be welcome anyways... Thanks for asking.
Blue Man Group, huh? There awesome. We saw their show, and my dad was picked to go onstage! (he did)
This is EXACTLY what I was looking for to complete my Mad Scientist halloween setup. I'm gonna hook up the speakers to a pipe organ (keyboard with some fancy filters) and play organ fugues.
this is gorgeous! now i need a fireplace so i can have one in my house!
i love it and i also love your haiku, and even though it didnt ryhme (even though most haiku's don't) i like it A LOT!!!!! < note count 'em 5 exclamation marks
Yeah I think the 2" tubbing works a lot better giving it more pressure, I also like that you improved the design a little with the propane regulator adaption, good job!
Well done, friend. Perhaps great minds do think alike. Best of luck!
whayhay rubens tubes are like buses you don't see one for ages then up pop's two at once lol (excellent insructabubble by the way)
how completely random to have never heard of a rubens' tube (sounds like something peewee herman would have in a movie theater) and then have two well written instructables in one day about the contraption nifty stuff indeed!
In the second video was that a dizzy gillespie or maynard ferguson, sound like them. :) Great instructable!!

About This Instructable

65,433views

221favorites

License:

More by ScaryBunnyMan:Grow Your Own Bioluminescent Algae Wiimote Rubens Tube: Control Fire With Sound! (And a Nintendo Wiimote!) 
Add instructable to: