Protonerd / FX-SaberOS

System code for Arduino based Lightsaber replicas for DIYino family boards
Creative Commons Zero v1.0 Universal
92 stars 42 forks source link

Battery Level #32

Closed FatherCool closed 4 years ago

FatherCool commented 6 years ago

I notice that the battery level is monitored. Is it possible to connect say 3 leds green, yellow, red to this to give an external level indicator? If so what pins do I fix the leds to?

jbkuma commented 6 years ago

It's possible, but it does not exist as a feature. The current behavior for RGB star LED type sabers is to fade the green and red according to the life span. At full, green is full and red is zero, at 50% green and red are both at 50% (yellow) at low life red is 100% green is 0. You can search for the blade meter function and alter this to suit your needs, be aware this meter is the same that is used for the volume indication. Alternatively you can write your own battery meter display routine and change the call in the menu routine from the generalized version to yours.

On my own heavily modified versions of LightsaberOS I've used pixels to create circle or bar meters.

Jason "Kuma" Brinkerhoff Mad Science Workshoppe, proprietor http://jbkuma.com/workshoppe

On Thu, Dec 21, 2017 at 9:26 AM, FatherCool notifications@github.com wrote:

I notice that the battery level is monitored. Is it possible to connect say 3 leds green, yellow, red to this to give an external level indicator? If so what pins do I fix the leds to?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Protonerd/FX-SaberOS/issues/32, or mute the thread https://github.com/notifications/unsubscribe-auth/ATdCMCsLuvzMyqrZsMyX3c90T7FF0FSEks5tCmp6gaJpZM4RJ4-b .

FatherCool commented 6 years ago

Ah right. I see. Well for now I will just get the saber working as is then tinker with the code. I have a bar of coloured leds on my hilt already which would be nice if it actually showed battery level rather than just lit as it currently is/was.

Protonerd commented 6 years ago

If I were you I would use a neopixel stick instead of the old style bar graph.

FatherCool commented 6 years ago

Thats a fair comment but my saber design has a series of individual 5mm leds on a box at the base of the hilt. An old school led bar would suit better.

jbkuma commented 6 years ago

You can always drive it with ws2811 chips and some clever programming. I use these chips quite a bit, actually.

On Dec 27, 2017 10:00 AM, "FatherCool" notifications@github.com wrote:

Thats a fair comment but my saber design has a series of individual 5mm leds on a box at the base of the hilt. An old school led bar would suit better.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Protonerd/FX-SaberOS/issues/32#issuecomment-354125829, or mute the thread https://github.com/notifications/unsubscribe-auth/ATdCMFcQeeMVBH7FpYRiEGEVQwqxS3ldks5tEluigaJpZM4RJ4-b .

FatherCool commented 6 years ago

Ok I will look into it. I am not desperate for this at the moment. Getting it working at all is No 1.