[Q] Light a bulb with android phone? - Java for Android App Development

For a college project, I wanna control a bulb with android(call, msg, or bluetooth). Please help me do that..I googled a lot !
Thanx in advance..!

sachintitus said:
For a college project, I wanna control a bulb with android(call, msg, or bluetooth). Please help me do that..I googled a lot !
Thanx in advance..!
Click to expand...
Click to collapse
cheating way:
1. Buy a cheap cellphone, disassemble and use outputs from the vibration motor to trigger a circuit. There are plenty of transistor based toggle switches schematics out there. So when u call the other number it will light the bulb. Call again and it turns the bulb off. You also going to need to disengage the toggle switch for certain period of time before in can process and build voltage level shifter, stick to mosfets and DC.
2. Using arduino products, they have a very nice line up of hardware with interface extensions and great community/library support.
PS: If you never developed an app for android stay away. For a Semester Project you are better off buying 2xXBEE cards, slapping a mosfet to DIO pin on one XBEE module and connecting it to LED. On the second XBEE u can put a toggle switch and configure them to do the necessary actions.

Related

Stop Blinking Bluetooth Indicator

Anyone know where in the registry can I turn off the blinking bluetooth indicator. Not really a big deal until I'm driving in my car at night - it's like a cop is behind me!!! And bright too!!
http://forum.xda-developers.com/sea...dir=DESC&show_results=topics&return_chars=200
V
Just to summarize: you can disable it, but only by disabling all the LED notifications - including WiFi, Radio and Power.
ZeBoxx: there is another less invasive way, but I've had no time to finish the app. But allledmgr will do the job for most purposes...
V
you're working on way too much at the same time, vijay It leaves you with many unfinished projects, and a lot of posts going "maybe vijay will write it for me" :>
Not that I'm one to talk.. *eyes that darn colorpicker*
Damn, forgot about the color picker. VJCandela's "GUI" wore me out. Working on something very very non GUI right now
V
haha, good! I really can't find time to work on that da*n thing :\
hmmm.... my cingular 8125 has no such key under Builtin. So, I added the key "AllLEDMgr" and made a DWORD value named "Index" inside it which I set to 0. Soft resetting had no affect on the LEDs.
Interestingly, I can't delete the key "AllLEDMgr" now as it's marked in use.
Sleuth255: dump your registry (and also your rom if you're feeling generous) and send it over to sleuth @ vijay555.com and I'll have a look..
V
I'm using the Wizard with norwegian ROM, and I don't have this registry key either. Does anyone know why, and how I can tweak the LEDs?
De-solder the LED or if you're not that adventurous, put a little bit of electrical/insulation tape over the LED
This should work, but it's not exactly the solution I was looking for....
lozzd said:
put a little bit of electrical/insulation tape over the LED
Click to expand...
Click to collapse
that'll block the green wifi one, too, though! What you really need is a bit of green gaffer tape; that should block practically all of the blue but leave the green coming through
Ok, I tried the green gaffer tape, but it didn't look too good. I'm going to try the soldering solution now, and probably solder inn an extra CPU while I'm in there, just to boost things up. Thanks for the good tips!
you're welcome!
and remember - use leaded solder. Sure, it's not as good for the environment, but it'll last longer!
It would actually be nice if there were a way to disable the flashing radio LED, but I have motive other than being annoyed by it.
I would like to be notified of new voicemail, appointments, & text messages via LED, however, since I am color blind (technically...I have a "color defect") I can not differentiate between the orange and green flashing LED (although I can see the blue one).
Therefore it would be better to have it off UNLESS there is an alert.
Is it possible that somebody can write something to change this or is it hopeless?

fast led-light-on shortcut, is it possible?

One of the function I use most on my wizard is the (flash) light in the camera mode. But its pretty annoying to have to go to cameramode every time i need a light. Maybe someone knows how to add a light on/off button or a shortcut or something to add to the htc home plugin. I would help me a lot.
Would love to know from a dev if this is possible!
I have been wondering if this is possible as well ever since I first got my phone. I always figured that if it was easy to do someone would have done it by now...
I mean just write a prog that checks the status of the hook to turn on/off the light and simply have it switch the status. No GUI necessary simply click the exe to switch the light on/off that way you could simply drop a link or ref to the program in whatever launcher you use and have that act as the button itself wham-bam-boom-done.
Being that I have never seen a prog that would do this I figured that you would need to do something unnecessarily complex to accomplish this; like you would be required to initialize the whole camera 'stack' (prob wrong terminology but whatever), something akin to starting a really messy windows service in order to even get the light to come on. I wouldn't want to have to deal with that kind of cpu load just to have an easily accessible flashlight function...
But if it can be accomplished easily I would love to see this developed!
Ooh Ooh Ooh... Me too!!!
That would be an awsome little program!
I install Car Stereos and Alarms... Heres the Stereo Guys version of making this work...
1> Take apart the Phone.
2> Find the light and cut the positive side of the LED. (assuming there is a common ground. would test for this prior to cutting)
3> Diode Isolate the primary (camera side) of the circuit
4> Diode Isolate the Secondary (new function) side of the circuit
5> from that point run a toggle switch inline on the secondary side to the battery... (careful soldering here... as well on circuit board)
6> Mount toggle switch to side of phone with electrical tape and hot glue!!! Ta Da!!!
hehe...
The above is for humourous information purposes only... Anyone putting a toggle switch on the side of their phone to turn on an LED is 1> Way cool for doing it and 2> Way geekier than me! While it may work, I wouldnt do it... hehehehe
I think i saw something like this in the development and hacking thread try searching there good luck!
StevesDesigns said:
Ooh Ooh Ooh... Me too!!!
That would be an awsome little program!
I install Car Stereos and Alarms... Heres the Stereo Guys version of making this work...
1> Take apart the Phone.
2> Find the light and cut the positive side of the LED. (assuming there is a common ground. would test for this prior to cutting)
3> Diode Isolate the primary (camera side) of the circuit
4> Diode Isolate the Secondary (new function) side of the circuit
5> from that point run a toggle switch inline on the secondary side to the battery... (careful soldering here... as well on circuit board)
6> Mount toggle switch to side of phone with electrical tape and hot glue!!! Ta Da!!!
hehe...
The above is for humourous information purposes only... Anyone putting a toggle switch on the side of their phone to turn on an LED is 1> Way cool for doing it and 2> Way geekier than me! While it may work, I wouldnt do it... hehehehe
Click to expand...
Click to collapse
Hahahah sound like a good idea........i wouldn't want to do that to my wizard, i rather go the slowest way.
BLAH.......BLAH..
http://www.vijay555.com/?Releases:VJCandela
Comes with a (legitimate) warning that constant use will burn out the LED before the rest of the phone. If you can live with that it'll probably do what you want.
Thnx, works for me. for as long as its gonna last

[REF]Managed HTC Light Sensor SDK released (with source)

I published the HTC Accelerometer SDK a while ago, and have been spending some time off and on trying to find out how to get access to the Nav API. No luck there yet, but I did figure out how to access the light sensor.
The updated API and source is available at:
http://www.koushikdutta.com/2008/07/htc-light-sensor-sdk.html
Koush
can you give us compiled exe?
where are the lightsensor? is it the front/back cam?
how often will auto light adjust update?
alltime? once per power on switch? once per minute?
when the autolight is not set, and it will be done by frontcam, we can safe cams energy, by switching off automatic backlighht adjust. cameras are needing a lot of power.
can anybody confirm that?
WooooWWW this keeps getting better!
Thanks HTC
Please.. Somebody will make a "really" adjustable light settings util with this SDK.. I want to set min backlit level to lower for totaly dark enviroments... because default one is too much than required..
Sorry for my poor English..
Sure, I'll make a utility to do that. Give me a bit though, I'm coding up the Nav sensor SDK right now.
feature request
disable light sensor when call is in progress.
enable light sensor back after call was terminated.
sensor option
Thank you,
I have noticed on the new Bang & Ollefson and another new highend phone [not iphone] they are set so that when the display is away from the air is is visable...against ear off......thus...
when you are looking at the display it is visable
when phone is covered by ear...display is off
take phone away from ear....display comes back on
back to ear display goes off....etc...
This is a fantastic feature and has a wow factor as a sales tool.
2395 said:
Thank you,
I have noticed on the new Bang & Ollefson and another new highend phone [not iphone] they are set so that when the display is away from the air is is visable...against ear off......thus...
when you are looking at the display it is visable
when phone is covered by ear...display is off
take phone away from ear....display comes back on
back to ear display goes off....etc...
This is a fantastic feature and has a wow factor as a sales tool.
Click to expand...
Click to collapse
This is exactly happen what i saw a few days ago..
iGo2008 running, a phone call received and i'm noticed display on & off with light sensor working !!!! I'm looked at the display it is visible (...from 10-15cm distance from my ear..) , when phone is covered my ear...display is off... I'm tried over and over again... still worked at the end of conversation... But when i'm closed iGO2008 and tried again... Not happen again...
Any ideas ???
2395 said:
Thank you,
I have noticed on the new Bang & Ollefson and another new highend phone [not iphone] they are set so that when the display is away from the air is is visable...against ear off......thus...
when you are looking at the display it is visable
when phone is covered by ear...display is off
take phone away from ear....display comes back on
back to ear display goes off....etc...
This is a fantastic feature and has a wow factor as a sales tool.
Click to expand...
Click to collapse
Nice work Koush - and I completely agree with the above quote. I'm surprised HTC didn't have this already included, having to press a button to wake the display is kind of stupid since it gets turned off by the light sensor
2395 said:
Thank you,
I have noticed on the new Bang & Ollefson and another new highend phone [not iphone] they are set so that when the display is away from the air is is visable...against ear off......thus...
when you are looking at the display it is visable
when phone is covered by ear...display is off
take phone away from ear....display comes back on
back to ear display goes off....etc...
This is a fantastic feature and has a wow factor as a sales tool.
Click to expand...
Click to collapse
Hands down thatll be one of the coolest tweaks!
DOMin8or said:
where are the lightsensor? is it the front/back cam?
Click to expand...
Click to collapse
Light sensor is just left of the front face phone speaker (inside the speaker recess).
2395 said:
when you are looking at the display it is visable
when phone is covered by ear...display is off
take phone away from ear....display comes back on
back to ear display goes off....etc...
Click to expand...
Click to collapse
This happens with the iPhone too.
It's exactly what we need to make the Diamond much better. I don't want the backlight on during a call as its a waste of battery - but I hate having to push the power button during a call if I need to enter a number or change to speakerphone etc.
How could HTC have missed out such a simple feature? Hopefully this is something that can easily be coded in? Fingers crossed
tnacar said:
Please.. Somebody will make a "really" adjustable light settings util with this SDK.. I want to set min backlit level to lower for totaly dark enviroments... because default one is too much than required..
Sorry for my poor English..
Click to expand...
Click to collapse
Any news here? I'd appreciate a tool or tweak to define minimal backlight level for myself because of the same reason.
somebody got ahead regarding the customization of automatic backlight changing with this api?
regards
this would be great if someone with programming skills looked into it!!! ie not me!
You don't have to press power button while on call to enable the backlight. Pressing the middle button (circle) will enable backlight and wont do anything with the call
wcg-tom said:
Any news here? I'd appreciate a tool or tweak to define minimal backlight level for myself because of the same reason.
Click to expand...
Click to collapse
i may have confused you!
this is the app i would like! reading ebooks in the dark is far too glaringly bright!
sad maybe but i do this alot
bugeyes said:
i may have confused you!
this is the app i would like! reading ebooks in the dark is far too glaringly bright!
sad maybe but i do this alot
Click to expand...
Click to collapse
confused?
no. i've exact the same problem
not reading ebooks, but just using my diamond in the dark sometimes...
now iam confusing you my previous post was aimed at the post by Haobe!

[REQ]Answering calls using the Light sensor or Gsensor or proximity sensor?

I was thinking if is possible to make a program that uses the light sensor to answer calls! (when u receive a call just put the phone to your ear and auto answers). I think that would be cool!
The author of Answerkeys Disabler looked at the the usability of the light sensor - his conclusion was that it was not sensitive enough for most applications - and I would expect that to include answering calls. Have a read through that thread for more info.
I think it's a daft idea anyway - lots of situations could cause a call to be accidentally answered.
Well, i think it would be a bad idea (sorry ).
What if you had it in your pocket or jacket? And when your asleep, and you get a call, then what? Your friend can hear you snoore or having a good time, with your gf
H3IN3K3N said:
Well, i think it would be a bad idea (sorry ).
What if you had it in your pocket or jacket? And when your asleep, and you get a call, then what? Your friend can hear you snoore or having a good time, with your gf
Click to expand...
Click to collapse
you are right
It could check the default state. If it's dark (probably in the pocket) then wait to be light(out of pocket) and than dark again to answer(ear).
But the problem is this will not work if it's night and you are somewhere outside and there's no light for the sensor to notice... Than again the application could have a setting to be active only during daylight and after sunset it would automatically disable itself.
How's that?
IIRC, the light sensor is updated at a fixed interval. So it may not be so accurate to answer a call (eg: you put the phone to your ear but the call is answered after a bit).
Maybe it would be better to use the GSensors to capture the phone movement you made to answer a call.
Marshall
Nom nom nom.. Interesting thread. Please do post your good ideas, then all of a sudden someone might invent the killer app
About the light sensor. The thing wont measure anything above 0 if lighting is poor. I mean not only in the middle of the desert at 4 AM when its darker then my coffee, but also in my fluorescently lit hallway, in which I can perfectly read a book. So the thing will always measure 0, you cannot detect changes in that, unfortunately.
Ideea
is it possible to connect the LIGHT sensor with GSensors? (ex: based on the G force produced when you look at the phone to see who's calling an then the light sensor is kicking in, if you want to answer put it at your ear, if not turn the phone face down and it shuts the ringing off!)
Just thinking......
drvdijk said:
Nom nom nom.. Interesting thread. Please do post your good ideas, then all of a sudden someone might invent the killer app
About the light sensor. The thing wont measure anything above 0 if lighting is poor. I mean not only in the middle of the desert at 4 AM when its darker then my coffee, but also in my fluorescently lit hallway, in which I can perfectly read a book. So the thing will always measure 0, you cannot detect changes in that, unfortunately.
Click to expand...
Click to collapse
something poped out in my head. When the phone rings the light comes on, is the sensor able to pickit up?
Nope. Tried this in the toilet in which the light was broken. It wouldn't get above 0. Taking a dump without lights is pretty hard by the way..
No other ideas?
Well...I keep my phone in it's luxurious pvc htc slide out pouch, it's pretty dark in there, if the light sensor is able to detect when the phone is in the shade of your ear it must be quite sensitive or else that just would not be possible. So imagine the phone locks automatically when it rings and then unlocks and auto answers when the light sensor detects an increased light level, You would need a few options I can't think of right now, but the normal answer button should still work in case no change is detected. So if your phone was in your pocket or pouch there would be no accidental button presses/call rejections and you would not have to press a button to answer it. = killer app.
Leave your phone face down on your desk, just pick it up to answer a call.
uniqueboy said:
Well...I keep my phone in it's luxurious pvc htc slide out pouch, it's pretty dark in there, if the light sensor is able to detect when the phone is in the shade of your ear it must be quite sensitive or else that just would not be possible. So imagine the phone locks automatically when it rings and then unlocks and auto answers when the light sensor detects an increased light level, You would need a few options I can't think of right now, but the normal answer button should still work in case no change is detected. So if your phone was in your pocket or pouch there would be no accidental button presses/call rejections and you would not have to press a button to answer it. = killer app.
Leave your phone face down on your desk, just pick it up to answer a call.
Click to expand...
Click to collapse
Is that possible right now then? I'd be very interested in the software that disables the screen as soon as it hits your ear.
Can anybody help to make this app?
Give me $50 and I'll make it for you, with the limitations as noted in this thread
drvdijk said:
Give me $50 and I'll make it for you, with the limitations as noted in this thread
Click to expand...
Click to collapse
I don't mind donating but being so upfront asking for money is a little inappropriate in my mind but if that's what it takes let's see how many people wants it, and donate for your cup of coffee!
Sorry, my point wasn't to ask for money (allthough my post clearly indicates that, I now notice). My point was that I need a very good reason to develop a program of which I know in advance will not work as we both would like to see it work.
So there is no way to make an app that auto answers when you put your phone at your ear (using GSensor or Light sensor)?
P.S. No more ideas? Or close this thread Forever!!!!
How about an application that implements a "proximity sensor" that other phones seem to have? It's kind of annoying to have the touchscreen turned off randomly when you need to punch in some numbers for automated hotlines.
Lawliet said:
How about an application that implements a "proximity sensor" that other phones seem to have? It's kind of annoying to have the touchscreen turned off randomly when you need to punch in some numbers for automated hotlines.
Click to expand...
Click to collapse
i think is a good idea!

BUG developers know that it?

Please go here:
http://forum.xda-developers.com/showthread.php?p=9258108#post9258108
To prove the point, get a camera, and HD2,You will see it glow white !
use a camera and point it at the sensor you will find the white light blinking while in android, where as in WINMO it doesnt, it blinks during calls only!!!
How does this matter at all? (unless it's some kind of vital bug in liblights)
shadiku said:
How does this matter at all? (unless it's some kind of vital bug in liblights)
Click to expand...
Click to collapse
I think the concern was that the IR light used for sensing if you are holding the phone up to your head during a call is on all the time instead of just during calls. In theory that would use a little extra battery, apart from that it wouldn't do anything.
Not a major concern, but if someone was looking at the lights code they could take a look.
markmarkr said:
I think the concern was that the IR light used for sensing if you are holding the phone up to your head during a call is on all the time instead of just during calls. In theory that would use a little extra battery, apart from that it wouldn't do anything.
Not a major concern, but if someone was looking at the lights code they could take a look.
Click to expand...
Click to collapse
Ah, I see. Thanks for clearing that up.
Mine don't glow..
Sent from my HTC HD2 using XDA App
It (infrared) glows but only while screen is on. Not in standby. But that could do SOME unnecessary draining if not in a call.
Dev know that?

Categories

Resources