B
Beowulf
Guest
I need help with a math puzzler related to an electronics project. I built
the BASIC Stamp microcontroller and have a project (photoresistor) that
measures light and reports the data values. The problem is in almost total
darkness the values range around 30000 to 40000 and with room light the
values drop to around 200. I want to use the gizmo to run in a dark room
and then monitor for light changes, so I would like high values to
indicate light not dark. So somehow I need to reverse the way the values
are reported. The problem is compounded by the simply math available to me
by way of the PBASIC command language of the Stamp: only +, -, /, *
available, no fancy operators like square root or anything. Ideas?
the BASIC Stamp microcontroller and have a project (photoresistor) that
measures light and reports the data values. The problem is in almost total
darkness the values range around 30000 to 40000 and with room light the
values drop to around 200. I want to use the gizmo to run in a dark room
and then monitor for light changes, so I would like high values to
indicate light not dark. So somehow I need to reverse the way the values
are reported. The problem is compounded by the simply math available to me
by way of the PBASIC command language of the Stamp: only +, -, /, *
available, no fancy operators like square root or anything. Ideas?