New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

B3 buzzer + change front LED color

Discuss development on Bubba
Magnus
Posts: 51
Joined: 02 Jan 2007, 03:52
Location: Sweden
Contact:

B3 buzzer + change front LED color

Post 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.. :D

Take a look at http://wiki.excito.org/wiki/index.php/L ... _LED_color
/Magnus
Magnus, Excito developer
www.excito.com
support@excito.com
et05hk6
Posts: 11
Joined: 09 Nov 2010, 15:18

Re: B3 buzzer + change front LED color

Post by et05hk6 »

hehe, lovely! More of this! :wink:
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: B3 buzzer + change front LED color

Post 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..)
Magnus
Posts: 51
Joined: 02 Jan 2007, 03:52
Location: Sweden
Contact:

Re: B3 buzzer + change front LED color

Post by Magnus »

Unfortunately no.. you get 4kHz, thats it.. :)
Magnus, Excito developer
www.excito.com
support@excito.com
DanielM
Posts: 637
Joined: 28 Mar 2008, 06:37
Location: Sweden

Re: B3 buzzer + change front LED color

Post 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
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: B3 buzzer + change front LED color

Post by Ubi »

ah yes, and then it can LED-morse that it has an out-of-cheese error!
willem2
Posts: 14
Joined: 07 May 2010, 07:38
Location: Belgium

Re: B3 buzzer + change front LED color

Post 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, ...
Magnus
Posts: 51
Joined: 02 Jan 2007, 03:52
Location: Sweden
Contact:

Re: B3 buzzer + change front LED color

Post 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
Magnus, Excito developer
www.excito.com
support@excito.com
Cheeseboy
Posts: 789
Joined: 08 Apr 2007, 12:16

Re: B3 buzzer + change front LED color

Post 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...
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: B3 buzzer + change front LED color

Post by Ubi »

yeah workign on it. Got the yoda voice already :D
Cheeseboy
Posts: 789
Joined: 08 Apr 2007, 12:16

Re: B3 buzzer + change front LED color

Post 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
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: B3 buzzer + change front LED color

Post by Ubi »

at least now we can do morse
asl
Posts: 23
Joined: 07 Feb 2011, 14:17

Re: B3 buzzer + change front LED color

Post 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?
tor
Posts: 703
Joined: 06 Dec 2006, 12:24
Contact:

Re: B3 buzzer + change front LED color

Post 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
Co-founder OpenProducts and Ex Excito Developer
asl
Posts: 23
Joined: 07 Feb 2011, 14:17

Re: B3 buzzer + change front LED color

Post 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.
Post Reply