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 / 1274
1273  |  1275
Subject: 
Re: light sensor problem?
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Mon, 24 Jul 2000 22:03:05 GMT
Viewed: 
1811 times
  
X millisecond is too late... :-)

Let me think about how to uncouple this from sys_time, so the code can
get higher resolutions.

If ACTIVE_SENSORS in the sample code below is defined to 0 (the default
state in legOS when no program is run, or no light/rotation sensor are
active), this code reduces power consumption from 26.3 mA to 18.1 mA
(I just measured it, after hacking up the sample, this seems to prove
the statement about efficiency above).

Actual legOS implementation already turn off active sensors if not in use or no program is run.

Yes, but even if all active sensors are turned of we are running
with a lot of CPU power due to the high sampling speed. If you lower
the sampling rate, the CPU will idle longer, thus save more power.

Personally I like this code (or some code like this, if this evolves
into an actual driver) better for another reason: It contains less
assembly, which makes it easier to follow...

I also like your code, if only it could sample faster... :-(((

Let me sleep over this, and have my measurements done in our lab.
I am shure there is a solution with flexible sampling rate from
X ms range down to the 0.X ms range.

This could be made to default to most power saving (and apropriate
for many applications), but changeable by the user through some function
like ds_set_sampling_rate(XXX us).


Eddie C. Dost
ecd@skynet.be



Message has 1 Reply:
  Re: light sensor problem?
 
(...) That should be great! :-) (...) use (...) Absolutely True!!!! :-) (...) I'm quite sure that you can do it!!!! :-) And this should be a real step forward!!!! What a beautiful thing to have some time to spend in this section of code... :-) I'm (...) (24 years ago, 24-Jul-00, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  Re: light sensor problem?
 
(...) :-) It is not the best implementation I've seen... :-) (...) Yes. I hate the delay loop but we I can't imagine how to do it better if we still need maximum speed in reading values from sensors. The routine also change his sampling speed if we (...) (24 years ago, 24-Jul-00, to lugnet.robotics.rcx.legos)

26 Messages in This Thread:








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

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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