External indicator LED for Pyra


ClockworkCoder

Chaotic Neutral
Joined
Jan 21, 2016
Messages
2,537
Location
Menzoberranzan
I'm just wondering, as I don't believe that there are any LEDs visible when the Pyra is closed (if there are, then this thread is a bit moot), that it would be nice if there could be an indicator to notify things like, for example, a critically low battery or new message(s).

I was wondering if it may be possible (assuming there isn't an external LED) to have some sort of USB dongle plugged in that could have an indicator / indicators that could be programmed to blink or light up for specific circumstances?

Is this a feature that's even possible?
 
I'm still a little worried about those... could become a little mess to show bluetooth/wifi/USB/etc. all there at the same spot...
 
You can always plug in a keyboard and have its capslock LED blinking like mad. That even works on bluetooth.
 
I'm still a little worried about those... could become a little mess to show bluetooth/wifi/USB/etc. all there at the same spot...
Yes, I think we can boil it down to a few different messages that need to be differentiated; nothing to show (default colour), on charge; you've left something on that's taking power (wifi, bluetooth, 4g); you've got a text message; you've got an incoming call. We probably need to make it configurable so you can tell it to ignore if you've left the 4G on, or if you want to leave wifi on all of the time (probably not a good idea with the honey pot wifi spots out there in most cities), or you're using bluetooth headphones so really don't need to be told you've left that on. And there are two spots and they're both RGB, and maybe one or two of those signals deserve a blinking indicator, while others can just be steady state.
 
It would be nice if it were easily configurable, as different people will have different priorities. I do recommend having a well documented default scheme though. Mum had an LG phone which used RGB LEDs for its external indicators but I never did work out what any of the colours actually meant.

-Neelix
 
It would be nice if it were easily configurable, as different people will have different priorities. I do recommend having a well documented default scheme though. Mum had an LG phone which used RGB LEDs for its external indicators but I never did work out what any of the colours actually meant.

-Neelix

I agree. I think the only thing that I believe that may be an ubiquitous requirement may be to check the state of the battery (ie. charging, using battery, and "needs charged"), which could use one of the leds (green = charging, orange = on battery, red, preferably blinking = needs charged).

However, I'd want to be able to script changes to all notifications, and an obvious one would be the %age battery left before "needs charged" is indicated. Different colours would suit different cases too...

Regarding other notifications, I'd want a couple of arbitrary indicators - for example if an email from a specific contact has arrived, or perhaps if my local server has gone offline.

I'm not sure what's possible, but I believe that the Pyra could be woken up, run a specific cron, and the state of LEDs set before going back to sleep... is this possible? If so, is it possible to also set one of the LEDs in to a "pulse" or "blink" state without additional hardware?
 
The best color to indicate low battery would be to turn off the LEDs.
That saves power :p

The irony isn't lost on me, howerver...

Below a certain level, I'd actually prefer it just safely shuts down on its own, but ideally not before first asking me for "help".
 
A few LED settings ideas...

Pyra on Fire
A "Pyra on Fire" setting is a must. Think randomly rotating and random intensity red & orange with occasional flickers of green, blue and white with each of the 2 LEDs running independently.

Mirror the base
On the keyboard area there are a pair of RGB LEDs as well. In this setting the lid would do left & right the same as the left & right on the keyboard deck.

System status pulse (colors & time just for example of idea)
Every N seconds (configurable), pulse for 0.20 of a second through a series of colors to show what is 'active'.
Orange 0.20s (Header - start of message)
Green/Yellow/Red 0.20s (Battery remaining capacity)
Blue/none 0.20s (bluetooth on/off)
Purple/none 0.20s (WiFi on/off)
White/none 0.20s (4G module on/off)
Orange 0.20s (Footer - end of message)

Audio Inferred Patterns (Disco)
Assign wavelengths of the light spectrum to the audio spectrum.
20 Hz = Red
1 kHz = Orange
5 kHz = Yellow
10 kHz = Blue
15 kHz = Green
20 kHz = Indigo/violet
How bright it shines in those frequencies is dependent on audio volume at those frequencies. Blaring white noise (full spectrum) would be white light. Two LEDs = stereo. The two lights will/could be different to left/right audio channels as well. I wonder if this can be set up as an output target from Pulse Audio.

Disco Phone Ringers
If Disco above can be made to work, the light patterns would be unique(ish) depending on the tune/tone/music played. If you give an incoming number a unique ringtone, the light pattern would be correspondingly unique. That unique pattern could exist even if the speakers are on mute. Ring tones, inbound text messages, inbound emails could all be differentiated with light based on tonal band, intensity and pattern.
 
@Grench I remember copying some flame algorithms in the past.. very lightweight. Ah, found one implementation I did in JS:

HTML:
//--------------------FIRE ----------------
var FireWidth=10;
var Fire= CreateSurface(FireWidth, 12, CreateColor(100,0,0));
var FireArr=new Array(FireWidth);
var FireCol=new Array(256);

function InitFire()
{ //Here we define a matrix to hold values for "hotness"
 for(var i=0 ; i<FireWidth; i++) {
     FireArr[i]= new Array(Fire.height);
      for(var j=0 ; j<Fire.height; j++) {
        FireArr[i][j]= 0 ;
      }
 }
 //Now we define a fire palette
 for(var i=0;i<=7; i++) FireCol[i]=CreateColor(i*22,0,0);    //Black to Red
 for(var i=0;i<=15;i++) FireCol[i+7]=CreateColor(192,i*12,0);    //Red to yellow
 for(var i=0;i<=30;i++) FireCol[i+7+15]=CreateColor(192,192,i*7);    //yellow to white
}



function DoFire()
{
 var FHm1=Fire.height-1;
 var FWm1=FireWidth-1;
 //On ground level, create "hotness"
 for (var i=0;i<FireWidth;i++)
    FireArr[i][FHm1]= Math.floor(Math.random()*50);
 Fire= CreateSurface(10, 12, CreateColor(0,0,0)); //Recreate the surface (we will strech and flip it)
 for(var j=1;j<FHm1;++j)
 for(var i=1;i<FWm1;++i)
 {
  //Ok, here we tell the pixels on top, to mix in a firelike manner
  FireArr[i][j]= Math.floor((FireArr[i][j]+FireArr[i+1][j+1]+FireArr[i-1][j+1])/3.2 ) ;

  //if (FireArr[i][j]<0) FireArr[i][j]=0; //We should check for boundaries... oh well.

  Fire.setPixel(i,j, FireCol[(FireArr[i][j])] ); //Put the calculated pixel on the Surface
 }

 //Now we draw it on screen... and it looks like a sun... well, almost :/
 Fire.rescale(30, 12);
 var FireBlitPosX=147+Math.sin(GetTime()/1000)*100;
 Fire.blit(FireBlitPosX,46);
 Fire.flipVertically();
 Fire.blit(FireBlitPosX,66);
}

  //For the mixing in a firelike manner, uou can also try one of these:
  //FireArr[i][j]= Math.floor((FireArr[i][j]+FireArr[i][j+1]+FireArr[i-1][j]+FireArr[i+1][j])/4 ) ;
  //FireArr[i][j]= Math.floor((FireArr[i][j]+FireArr[i][j+1]+FireArr[i+1][j])/3 ) ;
 
Last edited:
Personally I'm not a fan of the thing breathing or blinking in any way unless it really want to notify me that something urgent has happened (including the battery starting to become flat, I guess that case should be added to my set). But provided it's all scriptable and configurable, I don't mind you guys having it.
 
Personally I'm not a fan of the thing breathing or blinking in any way unless it really want to notify me that something urgent has happened (including the battery starting to become flat, I guess that case should be added to my set). But provided it's all scriptable and configurable, I don't mind you guys having it.

Fancy effects indeed get old soon, however good they are, but they do make really cool demos for anyone you're showing it to :)
 
@Grench I remember copying some flame algorithms in the past.. very lightweight. Ah, found one implementation I did in JS:
Cool. I'm betting that the intensity of the 'fire' could even be linked to the temperature of the SoC. Just because can.

Personally I'm not a fan of the thing breathing or blinking in any way unless it really want to notify me that something urgent has happened (including the battery starting to become flat, I guess that case should be added to my set). But provided it's all scriptable and configurable, I don't mind you guys having it.
Oh, "off" is most certainly a required option in any scenario.

Fancy effects indeed get old soon, however good they are, but they do make really cool demos for anyone you're showing it to :)

I still think that unique to ringtone matched LED display would potentially make a good caller ID when the device is muted on the desk. Audio output monitor => scale translation => LED activity should be possible.
 
by default, all shipped units will have their LEDs firing off morse code for "BUY DRAGONBOX.DE STUFF"
 
by default, all shipped units will have their LEDs firing off morse code for "BUY DRAGONBOX.DE STUFF"
In an infrared spectrum so you won't be able to see that it is transmitting. Now where did I put that foil hat to block the Russian microwave transmissions...?
 
Back
Top