![]() |
[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 |
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? |
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
Quote:
And output in terminal and LED is morse code... |
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
Quote:
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? :) |
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... |
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 ?
|
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
Quote:
|
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
Quote:
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. |
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
Quote:
Normally there is a character per second value but there is nothing too complicated about sentences in morse. Quote:
I was imagining a live keyboard type method but typing a string and pressing enter works fine. Quote:
|
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
Quote:
|
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
Quote:
|
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
Quote:
Quote:
Quote:
|
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
Speaking of morse code, couldn't the flash and camera be used to send data using the IrDA protocol perhaps some kind of time duplexing if the flash interferes with the camera? At night it could be possible to semaphore from one hilltop to another perhaps a few km at 1Mb/s or higher if the camera can handle the conversion.
|
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
Quote:
|
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
Copernicus, you're absolutely awesome. Yesterday I've suggested it, today, before my fingers were even able to rest, You've implemented it, including...
Quote:
One request - being able to switch stroboscopic light (with set parameters) ON without need to continuously press button. I.E strobo-torch mode. /Estel |
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
Quote:
Quote:
However, you're free to take the source code and modify it as you please. :) I've just set up a Github account for Lanterne, you can find it here: https://github.com/jpietrzak8/Lanterne I haven't gotten all the licensing rigamarole in place yet, but it's going to be under the same "GPL 2 or greater" thing as Pierogi is. :) |
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
Quote:
http://www.youtube.com/watch?v=A-Wh4NuRfeU And then really cool stuff like this from Icuk (God bless him, rest in peace): http://www.youtube.com/watch?v=sjSrw...endscreen&NR=1 |
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
It may be possible if you use the histogram function of fcam http://fcam.garage.maemo.org/apiDocs...histogram.html
there are a couple if examples but probably the best one is fcam's own autoexpose function source http://fcam.garage.maemo.org/apiDocs...pp_source.html |
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
In the process of setting up the source files to comply with the GPL licensing mechanism, I went ahead and cleaned up the user interface a bit, so there's a small update to Lanterne now making its way up to extras-devel. All this really does is move the torch and strobe options into their own windows, and place buttons for each Lanterne function onto the main window.
(I'm currently educating myself on the subtleties of playing with video hardware... :) ) |
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
Some more feedback after further playing with your creation.
I suppose it would make sense to have a toggling button for SOS? You never know if N900 and Lanterne could save somebodies life. I have added Lanterne to Lens Launcher so I can select it quickly. Presonally I am finding the default button height too small. Is it correct the values do not save? I suppose now the settings are on mostly on one page out the way, a "QSettings:save" button and a "reset to default" button should be fairly easy to add to the bottom of the window? Edit:- Also bugtracker is missing from the control file :) |
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
On the package overview page the listed homepage is for Pierogi, not Lanterne.
|
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
Quote:
(This is probably an aftereffect of coming from the iPhone world; I just assume "there's already an app for that" for any given idea...) Will do, I'll get one into the next update. :) Quote:
Quote:
Quote:
(Honestly, I was sure there was an all-purpose flashlight app already out there somewhere...) |
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
Quote:
Well, I guess I do now have a Github page for it, so I'll go ahead and use that for now. :) |
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
On the Strobe screen, Flash Brightness Level cannot be made lower than 12 with the minus button - intended?
Also, pressing the Strobe Flash button (once, briefly) does not make the LEDs flash - also intended? Holding it down works. I guess you wanted the user to press for a second and then release to flash once? Torch Brightness Level on the Torch screen can only take 0 or 1 with the plus/minus buttons - intended? P.S. I just managed to press Strobe Flash briefly and make it "strobe " continuously...the screen was in rotating just as I was pressing, maybe that caused it. Either way, cool stuff. |
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
Quote:
Quote:
Quote:
Quote:
Thanks! EDIT: I don't seem able to reproduce the continuous strobe bug... Can you tell me a little bit more about how to cause it? (Do you need to press while rotating, lift up while rotating, something like that?) Thanks! |
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
There are flashlight applications but they feature light on or off only AFAIK.
Hence the stream of feedback and comments :) |
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
Strobe flash duration doesn't work lower than 29.
Personally I'd stop at 50 if your combo boxes jumps values in blocks of 50, or at least a multiple of 10 It's a little annoying to get to 1 via the minus button and then the plus is 51, 101 etc Maybe a nicely worded "you can blind people or cause fits" discliamer dialog box would be a good idea? Only on first use or so you don't have to accept each time? Also I'd say Lanterne is becoming a "Camera LED Flash Tool" more than a "Experimenter". :) |
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
Quote:
|
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
Few small feature requests (and one a little bigger), if you don't mind:
1. I noticed, that Morse code interpreter uses torch mode, not "flash" one. I understand, that this allow controlling dot length in wider ranges (outside maximum ON time for flash), but OTOH, is sending something in morse via flashlight, one would, probably, like to get brightest output possible. Ideal idea would be to insert a torch/flash toggle in morse section, that would also affects possible limits ;) but if it's too much hassle, hardcoding it to flash (and limiting possible dot length) sounds OK, too. 2. I mentioned it before, but just in case it got missed - a button to activate stroboscopic light without need to push button continuously, please! 3. I've noticed, that it's the only existing program that talks with LEDs "properly" - i.e. don't collide with other programs, and/or allow to enable LEDs even, if slider is closed. I don't know if the latter was intended, but it is very cool feature! Now, finally, I can slide cover "just a little", without triggering camera-ui or quicklaunch&co, and enable torch! (easier to do with modified mugen covers, that open camera cover vertically, than with vanilla backcover, probably) So, here comes a little request - a "module" or spinoff (although, the former sounds more sane) of Lanterne, that would allow enabling and disabling torch without starting Lanterne GUI. Best scenario would be a config option in Lanterne GUI itself (or just some text config file, somewhere), that would enable/disable presence of that status menu entry. I know this feature request get quite big, but if there would be also a possibility to fine-tune parameters of that ON/OFF status menu button (i.e. it would use settings per-defined by users in Lanterne itself, for example, allow to use strobo with set parameters, instead of torch), it would become a flashlight heaven, a absolute no-brainer to completely replace other existing flashlight programs out here :) 4. From different "department" and also mentioned earlier, so just to sum it in one post - request for more input options in morse interpreter, like taking input from file etc. --- No matter what, thanks a lot for this program! You've achieved something considered to be impossible - actually improved usage of oldest (one of) (ab)used N900's hardware parts. Who would expect, that after so many years (flashlight apps were amongst first written), we will get whole bunch of new things to do with those two little LED's, and that even regular "torch" can be MUCH improved? /Estel |
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
Quote:
And yeah, I also noticed that the flash doesn't work when you set the duration very low. The odd thing is, values below 30 are listed as valid in the range data V4L2 is returning to me, so it may be that I can't really trust that data either... :( Quote:
Quote:
|
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
Quote:
Quote:
Quote:
Quote:
Quote:
https://github.com/jpietrzak8/Lanter.../lanflashled.h https://github.com/jpietrzak8/Lanter...anflashled.cpp So you could go ahead and set up something yourself, without having to wait for me. But yeah, putting together a command-line interface to Lanterne should be a heck of a lot easier than for Pierogi, so it might not take me forever to get it done. :) Quote:
|
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
Ok, Lanterne version 0.2.0 is now on its way up to extras-devel. In this version:
* A "continuous SOS beacon" feature has been added. Press the "SOS" button on the main page to start it running; press again to stop it. Note that the beacon uses the dot-duration value set in the Morse Code page, so you can speed it up or slow it down if you want. * I've given up on trying to play with the torch parameters, so I've gotten rid of the Torch window and replaced it with a simple Torch On/Off button on the main page. * The UI buttons have been modified to be (hopefully) a bit more finger-friendly. * All parameter values are now stored persistently via QSettings. * The strobe timer has been fixed to strobe first, not pause first. :) * The package meta-data has been improved slightly (setting up links to the Github website and bug management pages). Please note that Lanterne is a very young project, and will certainly contain bugs! Thanks. |
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
Quote:
--- Thanks a lot for your updates, this is real whirlwind of development! Just a little remark - after starting morse code output, there is no way to cancel it, except for closing whole program. Even going back and enabling torch mode result in torch getting activated, then deactivated by still-running morse code. Some way to cancel it would be great :) /Estel // Edit [Off-topic] I've noticed, that you're gathering donations for 2nd N900, for development purposes. I have some ideas, but I need to know your needs - is this device required to work 100%, or you could go with something like broken USB (for practical purposes, can be replaced by other communications channels, if you're not developing for USB hostmode, that is)? Asking in public instead of PM, as I'm still not sure if I'll be able to come with something meeting your criteria - so, I would like others to also get aware about need for a development device for such a friendly and, overall, great developer :) [/off-topic] |
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
Quote:
Let me make one more appeal: I personally keep a little LED flashlight on my keychain for when I really need a portable light. These things provide far brighter light than the N900 can, for a longer period of time, and are disposably cheap. For example: http://www.amazon.com/Cree-300LM-Min...ref=pd_cp_hi_0 Couldn't something like this work for you? :) Thanks! Quote:
[Off-topic] Quote:
I am considering whether a third N900 might be helpful; I could more easily play around with alternate OSs like Nemo or Arch, without the worry of interfering with either of my primary N900s... :) But in any case, I want to make sure that people don't think there is any sort of obligation tied to this app (or to Pierogi). This is free software (both in terms of money and of freedom), to do with as you please. Thanks![/Off-topic] |
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
Lanterne 0.3.0 is now making its way up to extras-devel. The big addition this time is the ability to load text files into the Morse code transmission window. It's pretty bare-bones right now, you just click on "Select Text File" and choose a file. (By default, it looks into the directory "/home/user/MyDocs/.documents".) (By the way, the contents of the text editor are _not_ stored persistently.)
If you prefer, you can still just type directly into the text editor box to create a message. You can also now pause a running transmission by hitting the "Pause Transmission" key. I've also added a warning message at the start of the app, telling users not to look directly into the flash LEDs. :) This warning should only show up once. And, I did finally manage to reproduce that rotation-button error. I've made a change that I think will fix it. (In any case, it looks like Qt is not very happy about managing UI components during a rotation, so more problems may crop up. I suppose it might be better to catch the signal that the app is rotating, and just shut down the entire UI until the rotation finishes...) As always, beware of new bugs! Thanks. |
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
I installed 0.0.1 with HAM but I didn't see 0.0.2 and I can't see 0.0.3 now, either. Using FAM, however, I see 0.0.3 now. The extras-devel repository is set up the same way in both HAM and FAM, and I can see an update for another extras-devel application in both (Opera Mobile, which I don't want to update). Please advise.
|
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
[idea/request]
how about a sound detection mode that makes the led flash with music input from the mic like react to the beats, also have mic sensitivity adjustment for it, or an option to play a music track and to flash in time to the beat would be cool. thank you for your work |
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
Quote:
|
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
Quote:
|
Re: [Announce] Lanterne - an app for experimenting with the flash LEDs
An option to quit or switch off the light on lens cover closed will be handy.
I was using the torch yesterday and automatically closed the lens cover. An hour or so later I spotted the battery drain and light from the gap in the cover. Oops. This is habit from using flashlight application TBH. I am starting to use lanterne as a replacement for it. FYI I have been having the issues with updates not coming through either. I have been installing with terminal and apt-get. Get root and "apt-get install lanterne --version 0.3.0" (or latest number) |
All times are GMT. The time now is 13:11. |
vBulletin® Version 3.8.8