★ TouchArcade needs your help. Click here to support us on Patreon.

Possible to use Light Sensor as a Button?

05-06-2009, 09:07 AM
#1
Joined: Mar 2009
Posts: 22
Possible to use Light Sensor as a Button?

like light off, button pressed.

or even recodnize gestures u do in front of it.

same goes for cam, would make sense using them as a button.
or implement in other ways.

greets
05-06-2009, 01:45 PM
#2
Joined: Nov 2008
Location: Portugal
Posts: 227
Being unfamiliar with iDevice Development, I'm not sure if you're able to use the light sensors or not, but I highly doubt you could use them to recognize gestures. They're probabaly ambient light sensors, not cameras. So the answer is Perhaps. You may be able to use them as a 2 way button, but that's about it.

05-06-2009, 02:27 PM
#3
Joined: Apr 2009
Location: 31.560499, -111.904128
Posts: 7,471
I don't think you can, as the SDK probably wouldn't allow you to, allthough in theory, it is possible. On a similar topic, does anyone know if face recognition software could be added to the iPhone? Is it all about the hardware, or could an app allow the camera to recognise a face. It's just my laptop has a webcam and to log-on you just sit infront of the camera and it recognises your face. It also includes some cool software that allows you to put masks, hats, features etc on your face using the face recognition.

Hakuna Matata
05-06-2009, 03:29 PM
#4
Joined: Mar 2009
Location: BC, Canada
Posts: 10
Quote:
Originally Posted by LBG View Post
On a similar topic, does anyone know if face recognition software could be added to the iPhone?
This guy just released the face detection code he used for one of this apps. I think it just finds faces on an image, but should be a good starting point.

http://blog.beetlebugsoftware.com/

Wopiti - Social gaming, on the move.

Wopiti Words - Addictive word finding game featuring exciting multiplayer action
05-06-2009, 04:00 PM
#5
Joined: Mar 2009
Posts: 22
light sensor:
yes maybe not a real gesture, but what about a swipe from left to right.
it does know more then light on and off. it more see how much light there is.

and i guess face recognition software is, ähm i wanted to say possbile, but im not sure if the phone is strong enough for real time face recognition.
05-06-2009, 04:49 PM
#6
Joined: Apr 2009
Location: 31.560499, -111.904128
Posts: 7,471
Quote:
Originally Posted by luis View Post
This guy just released the face detection code he used for one of this apps. I think it just finds faces on an image, but should be a good starting point.

http://blog.beetlebugsoftware.com/
Just downloaded it. And wow, I never knew the iPhone was capable of recognising faces. It's very basic but it is a good start. If sombody put some work into it, they could make a great app. I am suprised that nobody has stolen his code

Hakuna Matata
05-06-2009, 05:47 PM
#7
Joined: Dec 2008
Location: Sacramento, CA
Posts: 4,568
It's not allowed in the SDK. That API is restricted. Although the google app used it for their voice activation and there was a lot of controversy about it getting through just because they are google.

But yes you can use it technically.

Twitter: @Zincous
05-07-2009, 01:19 AM
#8
In the new iPhone SDK 3.0, there is a new API to use the proximity sensor. Don't know of anyone who has tried to use it as a button yet, but definitely possible.

Kevin Calderone - @bovinedragon
Trace 2 is Out!