maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] Lanterne - an all-purpose flashlight app (https://talk.maemo.org/showthread.php?t=90229)

Copernicus 2013-05-26 21:11

[Announce] Lanterne - an all-purpose flashlight app
 
3 Attachment(s)
Lanterne is a small app for working with the LEDs used to create a flash for the N900's camera. At the moment, it supports "torch" mode (continuously light the LEDs at low power), and "strobe" mode (a quick flash of the LEDs at high power). Also, holding down the "strobe" button will cause the LEDs to flash continuously (a "strobelight" effect).

The LED power, the duration of the strobe, and the pause between strobes can be modified.

Warning: I am not an expert on the flash LEDs! Although I have made an effort to ensure that only safe values can be entered for these parameters, I cannot say for certain that this app will not damage your LEDs. Use with caution!

At this point, several features have been added:
* A Morse code flasher, allowing you to type in a message or load a text file to be transmitted. The dot duration is configurable.
* A continuous SOS beacon.
* A continuous pulse (essentially, Morse E rather than SOS).
* Support for use with the red (indicator) LED.

Lanterne now recognizes the status of the camera cover, and avoids turning on the LEDs if it is closed (and will turn off the LEDs if the user closes the cover). Also, it can now exit when the user closes the camera cover.

Version 0.5.6 has been added to the end of this post, as well as submitted to the extras-devel repository.

Lanterne is open-source software, released under the GPL version 2 (or greater). You can find the source code at Github:

https://github.com/jpietrzak8/Lanterne

sixwheeledbeast 2013-05-26 21:57

Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
 
Thank you for this application.
One request (if you are taking any)...
I have always wished to be able to type out and flash morse code with the flashlight. Possible?

peterleinchen 2013-05-26 22:03

Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
 
Quote:

Originally Posted by sixwheeledbeast (Post 1347052)
I have always wished to be able to type out and flash morse code with the flashlight.

Of course typing plain text, or? ;)
And output in terminal and LED is morse code...

Copernicus 2013-05-26 22:06

Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
 
Quote:

Originally Posted by sixwheeledbeast (Post 1347052)
I have always wished to be able to type out and flash morse code with the flashlight. Possible?

It shouldn't be hard, at least in terms of turning the LED on and off. (I have to admit I never learned morse code myself, so I probably don't know all the tricks involved; I know a bit about how letters and numbers are keyed, but I think there's something more intricate involved when keying out full words and sentences...)

In any case, hooking up keyboard keys to sets of LED pulses shouldn't be too hard. I guess you could also feed text files into the thing and get series of pulses out...

It'd probably be easier to work with this using the "torch" mechanism rather than the "flash" mechanism, as I'd have finer control over "torch" timing; would you need the highest-level brightness for your morse code flashes? :)

Copernicus 2013-05-27 00:39

Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
 
Ok, version 0.1.0 of Lanterne is now on its way up to extras-devel. From the pull-down menu, you can now select "Morse Code", which will bring up a window with a text entry field; type your desired text into this field, click "Transmit Code", and the LED will flash out the characters for you.

There is also a "Dot Duration" spinbox; you can use this to determine the length of a dot. (A dash is three dots, dashes and dots are separated by a dot-length pause, characters are separated by a 3-dot-length pause, and words are separated by a 7-dot-length pause.)

This is just standard Morse alphabet, taken off of the Wiki page for Morse code. :) I haven't tried to add any internationalization or shortcuts or whatever (and I probably don't know enough to do it right anyway). But, at least, it should support the basics.

Now, the _really_ interesting app addition imho would be to have the N900 read incoming morse code, not just transmit it. :) Dunno just how much effort that would take, though...

panjgoori 2013-05-27 04:36

Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
 
thanks for the app. I have a question. for how long can we use N900'a LED's as flash continiously without damaging them ?

malfunctioning 2013-05-27 05:05

Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
 
Quote:

Originally Posted by sixwheeledbeast (Post 1347052)
Thank you for this application.
One request (if you are taking any)...
I have always wished to be able to type out and flash morse code with the flashlight. Possible?

You must have read my mind! One of the applications which I have planned for when I get into programming is a morse code application. This is one of its features, but it is a bit more ambitious than that. I am going to start learning programming for the N900 next month, but I don't know when I will become productive. :)

malfunctioning 2013-05-27 05:10

Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
 
Quote:

Originally Posted by Copernicus (Post 1347072)
Ok, version 0.1.0 of Lanterne is now on its way up to extras-devel. From the pull-down menu, you can now select "Morse Code", which will bring up a window with a text entry field; type your desired text into this field, click "Transmit Code", and the LED will flash out the characters for you.

There is also a "Dot Duration" spinbox; you can use this to determine the length of a dot. (A dash is three dots, dashes and dots are separated by a dot-length pause, characters are separated by a 3-dot-length pause, and words are separated by a 7-dot-length pause.)

This is just standard Morse alphabet, taken off of the Wiki page for Morse code. :) I haven't tried to add any internationalization or shortcuts or whatever (and I probably don't know enough to do it right anyway). But, at least, it should support the basics.

Now, the _really_ interesting app addition imho would be to have the N900 read incoming morse code, not just transmit it. :) Dunno just how much effort that would take, though...

This is amazing. LOL. I had also thought about the detection module. I don't know how feasible it is though. Ideally you would want to analyze a live video buffer without actually saving it on the fly, and perhaps apply some sort of levels filter to better detect on-off events.

Personally, I think doing this is a challenge, but I wouldn't put it past you to come up with a way to do it.

sixwheeledbeast 2013-05-27 09:07

Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
 
Quote:

Originally Posted by Copernicus (Post 1347055)
It shouldn't be hard, at least in terms of turning the LED on and off. (I have to admit I never learned morse code myself, so I probably don't know all the tricks involved; I know a bit about how letters and numbers are keyed, but I think there's something more intricate involved when keying out full words and sentences...)

CuteCW is a morse code application I use on N900 maybe worth a look if you fancy.
Normally there is a character per second value but there is nothing too complicated about sentences in morse.

Quote:

Originally Posted by Copernicus (Post 1347055)
In any case, hooking up keyboard keys to sets of LED pulses shouldn't be too hard. I guess you could also feed text files into the thing and get series of pulses out...

Thank you for the new version.
I was imagining a live keyboard type method but typing a string and pressing enter works fine.

Quote:

Originally Posted by Copernicus (Post 1347055)
It'd probably be easier to work with this using the "torch" mechanism rather than the "flash" mechanism, as I'd have finer control over "torch" timing; would you need the highest-level brightness for your morse code flashes? :)

You wouldn't need flash brightness IMO. I would stick to known safe limits of the LED's where possible.

Copernicus 2013-05-27 09:52

Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
 
Quote:

Originally Posted by panjgoori (Post 1347088)
I have a question. for how long can we use N900'a LED's as flash continiously without damaging them ?

I have absolutely no clue, and as such, would not use them for very long. Personally, I'd stick with the "torch" functionality instead, if you want to keep them on continuously...


All times are GMT. The time now is 06:41.

vBulletin® Version 3.8.8