To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 3753
3752  |  3754
Subject: 
table brickos light to percent
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Thu, 27 May 2004 18:40:33 GMT
Viewed: 
5095 times
  
i there a table or converter from brickos light readings to light
percentage ( and vice versa )

Thomas



Message has 2 Replies:
  Re: table brickos light to percent
 
(...) Hi Thomas, Here's the formula used in the dsensor.h include file: #define ds_scale(x) ((unsigned int)(x)>>6) //!< mask off bottom 6 bits #define LIGHT(a) (147 - ds_scale(a)/7) //!< map light sensor to 0..LIGHT_MAX This maps the raw sensor (...) (20 years ago, 27-May-04, to lugnet.robotics.rcx.legos)
  Re: table brickos light to percent
 
In my opinion, the best way to approach this is the following: When the program starts, begin a Calibration, by first activating the light sensor, then reading the value. You can either wait a specific amount of time or have the user press a button (...) (20 years ago, 27-May-04, to lugnet.robotics.rcx.legos)

3 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR