To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 4075
4074  |  4076
Subject: 
RE: Sensor raw score and communication
Newsgroups: 
lugnet.robotics
Date: 
Tue, 2 Mar 1999 19:23:02 GMT
Original-From: 
Schott, Wayne W (MED) <Wayne.Schott@#ihatespam#amermsx.med.ge.com>
Viewed: 
1101 times
  
Try sending 2 bytes

Low byte ranges from 0 to 255
High byte ranges from 0 to 255 multiplied by 256

Add them together and you can have values up to 65535 (unsigned)


On the RCX side (using integer math) you have to separate the high and
low byte

HiByte = LightValue / 256                // interger math has no
fraction part
LoByte = LightValue - (HiByte*256)

How you handle this math will depend on how you are programming the RCX.



Wayne W. Schott
schott@netwurx.net
Eagle, WI, USA



----------
From: Boon Poh Tan[SMTP:boon@tigger.ee.washington.edu]
Sent: Tuesday, March 02, 1999 5:37 AM
To: lego-robotics@crynwr.com
Subject: Sensor raw score and communication

I am one of the onwer of Lego Mindstorms.
Currently, I am working on a project that plan to have interaction
between the
RCX and the computer through the IR transmission. My main goal is to
have the
RCX send back the sensor information in raw score instead of the 0 - 100
for
light sensor and 0 or 1 for touch sensor.
I have try to call the lego mindstorms technical support which seem does
not
support the task that I am going to do.
I have browse the internet to get the information that going to help me
to
achieved my goal. Unfortunely, I still haven't figure out a way to do
the
programming using a suitable program for my window base operating
system.
I have a little knowledge on visual C++. But, I kind of not sure whether
I
should use visual basic which is the official mindstorm programming tool
that I
have to start learning as a beginer.

I am glad that I found the lugnet News Group that provide discussion
anout the
Lego Mindstorms.
I welcome and apprieciate all the command and help.

Thank you.

Boon
--
Did you check the web site first?: http://www.crynwr.com/lego-robotics

--
Did you check the web site first?: http://www.crynwr.com/lego-robotics



1 Message 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