Controlling Pandora L E D S -


kingoddball

Well-Known Member
Joined
Oct 26, 2009
Messages
1,686
Hi Guys!

The forum is a little sad lately, so I thought I'd ask something I wanted to know for a while..

It's been said that the LEDS can be controlled by us (end users - not devs).

Is there any software, or will/could it come with a piece of software so we can control the LEDS when we want to show the Pandora off (like an LED dance!!)??

I don't want to use the EXT (rx/tx). I'd rather just be able to play around with them via the OS...

I KNOW they are not coloured like these - I'm just popping this as an example.
different_lights.jpg


Also, are the lights all green
th_PandoraLED.jpg
or are some Blue like old images
th_DSC01715.jpg
?
 
ED mentioned on cebit that there are no user LEDs installed by default, however, all LEDs should be available via sysproc files (look in the kernel or libpnd source, both have them I think, at least the kernel should :p ).

//Edit:

From libpnd: include/pnd_device.h

Code:
  26 #define PND_DEVICE_LED_CHARGER "/sys/class/leds/pandora::charger"
  27 #define PND_DEVICE_LED_POWER   "/sys/class/leds/pandora::power"
  28 #define PND_DEVICE_LED_SD1     "/sys/class/leds/pandora::sd1"
  29 #define PND_DEVICE_LED_SD2     "/sys/class/leds/pandora::sd2"
  30 #define PND_DEVICE_LED_WIFI    "/sys/class/leds/pandora::wifi"
  31 #define PND_DEVICE_LED_BT      "/sys/class/leds/pandora::bluetooth"
 
would be cool to have the pandora do a knightrider style chasing pulsation with the leds when its plugged in or some nice effects for differnt apps such as notification on new emails etc
 
I built a 'blinkenlight' for when the battery gets low; for awhile I was blinking the power-led (green), but now I've switched it ot the charge led (red), so it stands out more (doens't look like a SD access :)

I had briefly considered (it was 3am ;) a few crazy LED patterns, for fun (easter egg?) -- a knight rider (cylon!) stryle swoosh back and forth across the LEDs is not hard to do. Or have it blink them relative to whats going on musicly, etc :p Lots of goofy stuff can be done, for sure.

The LEDs are devices that can be set at the shell or code levels by anyone (assuming permissions are opened up, I forget if they are open past root or not right now, but easily changed), and libpnd includes functions for working with them easily. (ie: get current brightnes,s set current brightness.) And since you can do it with a sh-script (notaz rules), you can easily fusk with things all you like.

Check libpnd for lots of handy stuff -- read the controls, work with the leds, get/set the cpu speed .. I've tried ot make a lot of things really easy, so folks can spend their time on their game code/etc, withotu futzing so much with the pandora-specific gunk.

jeff
 
I want the multi coloured ones like in the mock photo up top, looks sweet!

Skeezix, whats with your posts here, both of them are showing your comment followed by a massive long blank space...
Nice for mentioning the libpnd though, I dont know what it is yet, but will check it out, see if i cant get to grips with it and get my pandora looking like that spaceship in Close Encounters of the Third Kind.
aww yea!
 
Fzero said:
Skeezix, whats with your posts here, both of them are showing your comment followed by a massive long blank space...
1. Only happens to people with the Guru emblem
2. Doesn't happen if you use a standards compliant browser - For example Firefox...
3. Don't use Internet Explorer
4. You're on drugs
 
Last edited by a moderator:
1] ok i see, thanks for info, never noticed before

2] cant use firefox at work unfortunately, they like to monitor and can only do that with ie so i have to use it

3] i have no choice, due to the above

4] acieeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed! :)
 
That's some great news, Skeezix!

One day, could you release an sh-script and maybe add a few description points so we can all modify it on our own?

It just seems like an even easier way to attract more attention to the Pandora, too!

Software is fine - But dancing LEDS - That's just AWESOME!
 
ACHTUNG!!!
Das machine is nicht fur gefingerpoken und mittengrabben. Ist easy
schnappen der springenwerk, blowenfusen und corkenpoppen mit
spitzensparken. Ist nicht fur gewerken by das dummkopfen. Das
rubbernecken sightseeren keepen hands in das pockets. Relaxen und
vatch das blinkenlights!!!

Seriously, though, this is interesting to know. It's almost a pity that I have zero experience with soldering (so I won't be putting in any extra LEDs). :lol:
 
Out of curiosity, if some program does something like flash all the leds, how/when do they go back to correctly displaying power/wifi/whatever they were supposed to show?
 
The Kernal will have a pre setup code.

You can change it any time, but it wont change the kernals code.

The program will most likely run in User mode, not Root.
 
Trevsweb said:
would be cool to have the pandora do a knightrider style chasing pulsation with the leds when its plugged in or some nice effects for differnt apps such as notification on new emails etc
NO! I am serious!
i hate it on GP2x when gp2xmenu is playing with the power LED and I definitely don't want any app on the Pandora fooling around with the standard LEDs. If you want to add this feature to your software, make it so that a user can disable it. Please!
 
Last edited by a moderator:
Okay, so i have an ALIX 2D13 - an embedded PC i use as a personal firewall+router. It has L E D S ( :p ) controllable from userspace - i think in very similar fashion to the pandora's leds. And since both of them can run sh scripts, i think this example of driving the ALIX's leds from a shell script could be very easily ported over. One thing to note is that the ALIX's leds are implemented using GPIOs so they can only do on or off although the userspace allows to set values 0-255. (on the alix nonzero brightness is on). Also I have only 3 leds. Here we go with an example of a poor cylon/KITT animation:
Code:
#!/bin/sh
SPEED=0.2s
cd /sys/devices/platform/leds_alix2
echo -n none > leds:alix:1/trigger
echo -n none > leds:alix:2/trigger
echo -n none > leds:alix:3/trigger
echo -n 0 > leds:alix:1/brightness
echo -n 0 > leds:alix:2/brightness
echo -n 0 > leds:alix:3/brightness
while true; do
        echo -n 255 > leds:alix:1/brightness
        sleep $SPEED
        echo -n 0 > leds:alix:1/brightness
        echo -n 255 > leds:alix:2/brightness
        sleep $SPEED
        echo -n 0 > leds:alix:2/brightness
        echo -n 255 > leds:alix:3/brightness
        sleep $SPEED
        echo -n 0 > leds:alix:3/brightness
        echo -n 255 > leds:alix:2/brightness
        sleep $SPEED
        echo -n 0 > leds:alix:2/brightness
done;
And if you have a media player capable of playing .3gp - here is a 5 sec video taken with my ancient phone of the above script running.
 
Last edited by a moderator:
Looks great urjaman ,what i would like to know is ,what colour will the leds be
on the Pandora ,will they be multicolour or standard also i would have thught
green for power ,orange for data ,and red for charge ,blue could also be emm
wireless .. sounds like the perfect set of leds to me.
 
Back
Top