Light Sensor

Post your NXJ projects, project ideas, etc here!

Moderators: 99jonathan, roger, imaqine

Light Sensor

Postby geiwojiaxue » Fri Sep 16, 2011 8:06 am

How can I differentiate a black circle, a black blob and a black blob in a black circle
using light sensor?

Anyone get some ideas?

Thanks
geiwojiaxue
New User
 
Posts: 1
Joined: Fri Sep 16, 2011 8:03 am

Re: Light Sensor

Postby Aravind » Mon Oct 03, 2011 6:59 am

If you have a movable light sensor, then scan the entire sample and store the values, say in an array. Let the value for black be 0. If your array has only 0's, you have a blob. If your arrays have 0 only in the start and the end, you have a circle. Not too sure about the blob in the circle, but if you have continuous 0's separated in 2 places by non zeroes, that is three 'groups' of zeroes, then maybe you have a blob in a circle.
Aravind
New User
 
Posts: 17
Joined: Sat Jun 04, 2011 2:55 am

Re: Light Sensor

Postby Rickz2020 » Mon Oct 03, 2011 10:15 pm

Can't you search the array from the start to end, then If the array has 0's at start 1's followed by more 0's to tell if it's a blob in a circle?

Eg: 0000011100000011100000
Rickz2020
Active User
 
Posts: 121
Joined: Thu Feb 10, 2011 5:47 pm
Location: London, Earth.


Return to NXJ Projects

Who is online

Users browsing this forum: No registered users and 1 guest

more stuff