maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   N900: How to turn infrared-led ON? (https://talk.maemo.org/showthread.php?t=88607)

AapoRantalainen 2013-01-10 09:03

N900: How to turn infrared-led ON?
 
I'm planning to use N900 as light beacon for infrared-camera (e.g. as wiimote's sensor bar replacement). So I'm looking way to just turn infrared led on. Not transmitting any IR-codes.

I made first test with lirc and it's irsend, but it is targeted for IR-signaling, so it is not very suitable as it (maybe with very special config-file).

Dragoss91 2013-01-10 09:21

Re: N900: How to turn infrared-led ON?
 
That little tx led is not enough to illuminate something in the dark . You better try a case mod on your N900 with a separated circuit for an ir torch . Just like that guy modded n900 case with bigger lens for camera .

AapoRantalainen 2013-01-10 09:50

Re: N900: How to turn infrared-led ON?
 
Quote:

Originally Posted by Dragoss91 (Post 1313164)
That little tx led is not enough to illuminate something in the dark

It is enough if infrared-camera can see it.

GrimyHR 2013-01-10 10:02

Re: N900: How to turn infrared-led ON?
 
Quote:

Originally Posted by Dragoss91 (Post 1313164)
That little tx led is not enough to illuminate something in the dark . You better try a case mod on your N900 with a separated circuit for an ir torch . Just like that guy modded n900 case with bigger lens for camera .

it is probably much stronger than any of those cheap wii wireless sensor bars
althou two candles still give the best results

Dragoss91 2013-01-11 21:45

Re: N900: How to turn infrared-led ON?
 
Quote:

Originally Posted by AapoRantalainen (Post 1313180)
It is enough if infrared-camera can see it.

That camera sees it because is oriented face to face and at few meters distance it will see it like a white dot . You better think about making a torchlight that could illuminate your whole room with infrared light so you will be able to record anything with your camera . :)

sixwheeledbeast 2013-01-11 23:40

Re: N900: How to turn infrared-led ON?
 
I agree, the IRED is not going to illuminate much.
It is not designed for this purpose.

AapoRantalainen 2013-01-12 12:11

Re: N900: How to turn infrared-led ON?
 
My opening post was too vague and general. I'm planning to use N900 as Wiimote's sensor bar. (Sensor bar is bold name for 12 infrared leds). I have used two candles, but they emits too much visible light when playing/surfing/watching on dark room. And they are not safe when there are children and animals running on the same room. Self made battery+IR-led would work but I'm not handy to make it nice looking. (I almost bought wii wireless sensor bar, but seller didn't know how often battery must be changed).

And I'm Maemo-hacker so I'm looking software solution :D

-----
With lirc and endless bash loop I can blink IR-led forever. With one N900 this is enough for wiimote to work (under Ubuntu and open source driver it needs only one led), but it lags/jitters (I think it is because of blinking).

I also test with two N900's side by side, but they are not blinking in same sync, so mouse cursor is continously waving/jumping left to rigth (=not usable).

sixwheeledbeast 2013-01-12 12:54

Re: N900: How to turn infrared-led ON?
 
The dev of Pierogi is the man to ask about this.
Not seen him about for a while tho.

AapoRantalainen 2013-01-12 15:30

Re: N900: How to turn infrared-led ON?
 
Quote:

Originally Posted by sixwheeledbeast (Post 1314073)
Pierogi

Thanks, documentation of Pierogi: Light led for 999ms: echo 999 > /dev/lirc0
999 is biggest it accepts. Next step would be tuning driver: http://svn.jacekowski.org/host_mode/...rc/lirc_rx51.c

So far this is my best:
Code:

#!/bin/bash
while [  0 -lt 1 ]; do
        echo 999 > /dev/lirc0
done

(And then it uses continuously 4-5% CPU)

When looking trough another N900's camera there aren't blinking at all.

[EDIT]
Simple modification to the driver:
Code:

drivers/input/lirc/lirc_rx51.c
        -counter += (u32)(lirc_rx51->fclk_khz * usec / (1000));
        +counter += (u32)(lirc_rx51->fclk_khz * INT_MAX);

So the value is totally skipped (it must still be in range[100,999]). Led will be then ON ~3.5 minutes (which is not INT_MAX), wrap it inside bash-loop.

If echo is stopped (ctrl+c) led is dimmed OFF.

When infrared is in use, device can't go deep sleep states, so bash loop is not heavy addition.
[/EDIT]

nokiabot 2013-04-22 13:31

Re: N900: How to turn infrared-led ON?
 
Can i record lightless with infrared with n900 camera ? Are infrared torches available what about a tiny infrared module on back of n900?
If this can happen then lets sue estel to put one on his mod:)


All times are GMT. The time now is 21:47.

vBulletin® Version 3.8.8