new Vs old


Ahh, good point. I'm not too informed on the Pandora's different states, but "low-power mode" is more what I was thinking. Just like how laptops go to sleep when the lid's closed (well... if you set it that way). Pandora stays on if the lid's shut?


Edit:


@onpon4: caught your jab, btw. :p
 
Last edited by a moderator:
lid close settings are as follows...


Turn Off the screen


Go into low power mode (same as when pressing the power button for less than 3 seconds)


Shut the pandora down.
 
Last edited by a moderator:
pandora_battery_tetris.gif



Apologies in advance to the person or persons I swiped this photo from. Also, pretty sure I don't have the colors right, but I couldn't find a good pic with all the LEDs lit up with the right colors. ^_^


Also hope this isn't derailing the thread too much at this point. :mellow:


onpon4: awesome coincidence :lol:
 
Last edited by a moderator:
pandora_battery_tetris.gif



Apologies in advance to the person or persons I swiped this photo from. Also, pretty sure I don't have the colors right, but I couldn't find a good pic with all the LEDs lit up with the right colors. ^_^


Also hope this isn't derailing the thread too much at this point. :mellow:


onpon4: awesome coincidence :lol:
The pandora is kitt!

https://www.youtube.com/embed/8ZwFRR2P77g?feature=oembed
 
Also, pretty sure I don't have the colors right, but I couldn't find a good pic with all the LEDs lit up with the right colors. ^_^
There's also two spots where there are no LEDs, just pads for you to solder your own. :p


From left to right, it goes green, green, red, orange/yellow (looks more like red, but I'm told it's supposed to be an orange/yellow), empty, empty, red, green.
 
Is it too late to enter the coding competition? B)


It needs privileges so run from the command line:


sudo ./krled.sh.txt



Code:
#!/bin/bash

# Flashes four left LEDs in a back and forth sequence


D=.05  # Delay between flashes in seconds

L=5   # Number of loops

X=0

while [ $X -lt $L ]; do

echo 1 > /sys/class/leds/pandora::sd1/brightness

sleep $D

echo 0 > /sys/class/leds/pandora::sd1/brightness

sleep $D

echo 1 > /sys/class/leds/pandora::sd2/brightness

sleep $D

echo 0 > /sys/class/leds/pandora::sd2/brightness

sleep $D

echo 1 > /sys/class/leds/pandora::wifi/brightness

sleep $D

echo 0 > /sys/class/leds/pandora::wifi/brightness

sleep $D

echo 1 > /sys/class/leds/pandora::bluetooth/brightness

sleep $D

echo 0 > /sys/class/leds/pandora::bluetooth/brightness

sleep $D

echo 1 > /sys/class/leds/pandora::wifi/brightness

sleep $D

echo 0 > /sys/class/leds/pandora::wifi/brightness

sleep $D

echo 1 > /sys/class/leds/pandora::sd2/brightness

sleep $D

echo 0 > /sys/class/leds/pandora::sd2/brightness

sleep $D

let X=X+1

done

#restore default LED triggers

echo mmc0 > /sys/class/leds/pandora::sd1/trigger

echo mmc1 > /sys/class/leds/pandora::sd2/trigger

echo bluetooth > /sys/class/leds/pandora::bluetooth/trigger
 

Attachments

  • krled.sh.txt
    1.1 KB · Views: 220
Last edited by a moderator:
Last edited by a moderator:
Also, pretty sure I don't have the colors right, but I couldn't find a good pic with all the LEDs lit up with the right colors.
There's also two spots where there are no LEDs, just pads for you to solder your own. From left to right, it goes green, green, red, orange/yellow (looks more like red, but I'm told it's supposed to be an orange/yellow), empty, empty, red, green.

Hmm, kinda thought the board looked a bit bare in that area lol. Ah well... not gonna redo it. :p Power outage just killed the source. ><
 
Last edited by a moderator:
Is it too late to enter the coding competition? B)


It needs privileges so run from the command line:


sudo ./krled.sh.txt



Code:
#!/bin/bash

# Flashes four left LEDs in a back and forth sequence


D=.05  # Delay between flashes in seconds

L=5   # Number of loops

X=0

while [ $X -lt $L ]; do

echo 1 &gt; /sys/class/leds/pandora::sd1/brightness

sleep $D

echo 0 &gt; /sys/class/leds/pandora::sd1/brightness

sleep $D

echo 1 &gt; /sys/class/leds/pandora::sd2/brightness

sleep $D

echo 0 &gt; /sys/class/leds/pandora::sd2/brightness

sleep $D

echo 1 &gt; /sys/class/leds/pandora::wifi/brightness

sleep $D

echo 0 &gt; /sys/class/leds/pandora::wifi/brightness

sleep $D

echo 1 &gt; /sys/class/leds/pandora::bluetooth/brightness

sleep $D

echo 0 &gt; /sys/class/leds/pandora::bluetooth/brightness

sleep $D

echo 1 &gt; /sys/class/leds/pandora::wifi/brightness

sleep $D

echo 0 &gt; /sys/class/leds/pandora::wifi/brightness

sleep $D

echo 1 &gt; /sys/class/leds/pandora::sd2/brightness

sleep $D

echo 0 &gt; /sys/class/leds/pandora::sd2/brightness

sleep $D

let X=X+1

done

#restore default LED triggers

echo mmc0 &gt; /sys/class/leds/pandora::sd1/trigger

echo mmc1 &gt; /sys/class/leds/pandora::sd2/trigger

echo bluetooth &gt; /sys/class/leds/pandora::bluetooth/trigger
Argh, flashy xD Let's see if you could smooth this a bit more...


I like the krledsevensmoother.sh.txt best :D








EDIT: added "Original by dgame" and "Modified by fahrstuhl". Thought that'd make sense oo"
 

Attachments

  • krledsmooth.sh.txt
    1.1 KB · Views: 216
  • krledsevenmoother.sh.txt
    1.2 KB · Views: 205
Last edited by a moderator:
man i really need to get learning bash scripts so i can read all this code properly.


that LED sequence in Tj image is what im talking about, thats what i want going on in my Pandora.


ps: feel free to derail thread at will, or continue this with LED sequence chat. I have my answer to my original question about the differences in the new and old Pandoras
 
i dont know how anybody else feels about these, but these seriously need to be on while charging!


or probably during bootup
 
Last edited by a moderator:
Nice mods Fahrstuhl


FZERO, the first two LEDs on the right side do not exist so we cant do both sides like in Tj's image


The left side sequence could be done as one long linear script or it could be done with some nested loops


Probably would be easier do a linear script that mimics the behavior line by line


mcobit, good taste in music
 
I can't try the scripts out (no Pandora) but I can see what it's doing. Pretty straightforward huh. Is it possible to do what I did in my GIF tho? Is it possible to access battery information and have the script react to it, I mean?
 
not possible, becuase there are no LEDs on the left 2 of the right set of LEDs, its just light pipes, and possible connections for hacked LEDs to use for whatever you want
 
I understand that, but I was asking about the possibility of having the LEDs controlled by battery information. In other words, can the script be configured to see what percent or value or what-have-you the battery has, and use that information in the script?


I'm not knowledgeable enough in scripting this type of thing, but I would imagine it'd require some if-then statements, like "if (battery percent) >= 0.5 {4 LEDs on}"


(that example probably looks real bad to you guys, but that's the best I can muster right now :p )
 
Yes, a script can do that. The percent full can be read at /sys/class/power_supply/bq27001/capacity. Just read it like a file and it tells you.
 
@ Stan


When I was mentioning the LEDs, I just mentioned power usage in reference to the increased standbye time with the new kernel. IIRC, juice to the LEDs is more than that of the suspended SOC. I recall this conversation with ED I believe while discussing the new kernels dramatic increase in battery usage.
 
Back
Top