You don't have to use Python to program the Pi's GPIO. It's supported by C, BASIC, Shells, Pascal, Perl, PHP, Ruby and probably many others...JoshuaLewis1809 wrote:Hi!
My mate and I are in a band, and will be performing Omen by The Prodigy in our school battle of the bands. We thought it'd be really cool to get the Pi to play the glokenspiel in the song. So we have 3 solenoids to play three notes, wire, stripboard, resistors, transistors, springs for the solenoids to return to normal position(?), diodes, and a 12v power supply that we have to taken the end off of so there's just bare wire.
I assume ill have to write a python script thing to do this.
Anyone got any coding/circuit suggestions? My mate and I are AS Physics standard electronics, so were not too awful (ha)
Thanks for your time, anything you have to say would be valuable!
I would recommend Python if you are a python programmer. I'm a C programmer (mostly), so I would recommend C.JoshuaLewis1809 wrote:yeah i did see that! but I swear we thought of it without seeing that first haha.
hmm, well would you not recommend python? seems like the easiest way of doing it
and also, I don't think the circuit will be particularly difficult, just not too sure as which pins to attach the negative terminal wire to - ground or the 0V pin. well have three of these, so i dont know where the other two would go...
Code: Select all
GPIO.output(7, True) time.sleep(1) GPIO.output(12, True) time.sleep(1)
Code: Select all
GPIO.output(7, True) time.sleep(1) GPIO.output(7,False) GPIO.output(12, True) time.sleep(1) GPIO.output(12,False)
You are unlikely to get an answer as JoshuaLewis1809 has not been on the forum since 01 Feb 2013, 21:43