Page 1 of 2
B3 buzzer + change front LED color
Posted: 17 Nov 2010, 04:24
by Magnus
If you think your B3 is to quiet you could always try using the internal buzzer.. Or why not change the front LED to red now when it's getting closer to Christmas..
Take a look at
http://wiki.excito.org/wiki/index.php/L ... _LED_color
/Magnus
Re: B3 buzzer + change front LED color
Posted: 17 Nov 2010, 04:41
by et05hk6
hehe, lovely! More of this!

Re: B3 buzzer + change front LED color
Posted: 17 Nov 2010, 05:51
by Ubi
so... can we hack the speaker to make it play wav files? So it can say "ohh... yes" when you plug in a usb stick or other junevile pranks? ((makgin it say "cannot find network" sounds more usefull..)
Re: B3 buzzer + change front LED color
Posted: 17 Nov 2010, 06:08
by Magnus
Unfortunately no.. you get 4kHz, thats it..

Re: B3 buzzer + change front LED color
Posted: 17 Nov 2010, 06:49
by DanielM
Can we do anything fun with the other stuff in there too? Like ledfreq for example, is this the frequency of the led when blinking?
/Daniel
Re: B3 buzzer + change front LED color
Posted: 17 Nov 2010, 07:42
by Ubi
ah yes, and then it can LED-morse that it has an out-of-cheese error!
Re: B3 buzzer + change front LED color
Posted: 17 Nov 2010, 16:33
by willem2
I've seen the wiki:
Code: Select all
echo 1 > /sys/bus/platform/devices/bubbatwo/buzzer
Is this B3 only, or both - the /bubbatwo/ is somewhat confusing, ...
Re: B3 buzzer + change front LED color
Posted: 18 Nov 2010, 02:30
by Magnus
Willem2, it's for B3 only. The 'bubbatwo' file structure is a legacy from older source code. Same with LED blink, not supported on B3.
/Magnus
Re: B3 buzzer + change front LED color
Posted: 17 Dec 2010, 15:02
by Cheeseboy
Unfortunately no.. you get 4kHz, thats it..
I'm sure that you can make it do what you want if you are determined enough.
I saw speech synthesis and samples done with the tone generator meant for the cassette tape recorder for the Radio Shack TRS-80 in 1979.
I also saw a demo for the C64 playing a tune on the floppy drive.
The 4K tone could be pulsed to emulate other tones, just as the LED could be pulsed to generate another perceived light intensity... (just an idea)
I challenge the community to make it play something recognizable!
EDIT:
Changed colour to intensity...
Re: B3 buzzer + change front LED color
Posted: 17 Dec 2010, 17:15
by Ubi
yeah workign on it. Got the yoda voice already

Re: B3 buzzer + change front LED color
Posted: 18 Dec 2010, 07:27
by Cheeseboy
Good for you!
My first experiment made it rasp (it has potential

)
Code: Select all
root@b3:~# cat monkey
for ((i = 0 ; i < 100 ; i++))
do
echo 1 > /sys/bus/platform/devices/bubbatwo/buzzer
for ((ii = 0 ; ii < i ; ii++))
do
echo "monkey" > /dev/null
done
echo 0 > /sys/bus/platform/devices/bubbatwo/buzzer
done
Re: B3 buzzer + change front LED color
Posted: 18 Dec 2010, 07:52
by Ubi
at least now we can do morse
Re: B3 buzzer + change front LED color
Posted: 07 Feb 2011, 14:25
by asl
I've been looking through the driver code for the LEDs:
http://download.excito.net/kernel/Excito_B3/2.6.37/
Could somebody explain what the b3_led_train_start() and b3_led_train_stop() functions are for?
Are they are not plain LEDs connection to GPIO lines?
Re: B3 buzzer + change front LED color
Posted: 07 Feb 2011, 14:40
by tor
Hi asl (And others),
You can safely ignore these functions for now. The first revisions of B3 had a one wire "pvm" interface to enable blinking with the leds. This never worked out due to crappy documentation on that circuit (Resulting in really crappy code on that part as well). Thus we ripped out all functionality except the code to set the circuit in "Pass through" mode leaving simple GPIO for the leds.
Upcoming production batches will thus not even have this circuit. So do ignore
/Tor
Re: B3 buzzer + change front LED color
Posted: 08 Feb 2011, 13:41
by asl
Great it can be ignored. It then becomes possible to use the struct gpio_led_platform_data in bubba3-setup.c and throw away the bubba3-gpio.c file. I guess that will make it easier to get the code accepted upstream.
How well encapsulated is your user space code which accesses the LEDs? Moving to a normal kernel API LED driver will mean it is not backwards compatible with your current "proprietary" /sys/class API.