View Single Post
  #12   Spotlight this post!  
Unread 07-01-2003, 01:27
rwaliany's Avatar
rwaliany rwaliany is offline
R
None #0691 (HartBurn)
Team Role: Programmer
 
Join Date: Jan 2003
Rookie Year: 2000
Location: http://www.hartrobot.com
Posts: 137
rwaliany will become famous soon enough
Quote:
Originally posted by Noah
you could sum the values of the bits...
--------------------code-------------------
sensorPower = sensorReadings.bit0 + sensorReading.bit1 + ... + sensorReading.bit8

This would yeild a value between 1 and 8 that would increase and decrease in a linear fashion.
Technically, that doesn't really measure the "strength" it measures the duration. The sensor will give off a constant ON signal if it is directed in the right place and the robot doesn't move. The summation might be problematic when your moving, say you move, you have a raw count, it could be 11111000. Unless you count the individual bits and their chronological order, this information would be useless. You could tell when your getting closer and farther away, but it doesn't specify a direction. Without chronological order or doing each bit separate, it seems useless to count the bits.
__________________
R

Last edited by rwaliany : 07-01-2003 at 01:38.