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 / 3514
3513  |  3515
Subject: 
Re: Simplifying Cygwin & brickOS/leJOS
Newsgroups: 
lugnet.robotics.rcx, lugnet.robotics.rcx.legos, lugnet.robotics.rcx.java
Date: 
Thu, 6 Nov 2003 09:14:47 GMT
Viewed: 
169 times
  
In lugnet.robotics.rcx, Scott Davis wrote:
Hi
A while ago I looked at using IC for writing programs.  At the time there
were 2 major turnoffs.  There was no support for rotation sensors and you
needed to own one of the serial infrared towers.  It was easy to install and
it had its own firmware.  But that was about a year and a half ago since I
last looked into it.  http://www.kipr.org/ic/index.html is the link.

Scott

Dear Scott,

Unfortunately it is still true that Interactive C does not support the
USB-tower, but I am pretty sure this will be changed with the further releases
(I recently bought a serial-tower at Shop.Lego for 16.99 Euro only!).

But it (IC4) now supports everything else - including the rotation sensor. The
special documentation for the RCX (not for the Handyboard) says:

"void enable_encoder(int sensor)
void enable_bidir_encoder(int sensor)

These functions enable a particular sensor port to act as an encoder.  This is
best used with the Lego rotation sensor.  enable_encoder enables the sensor in
unidirectional mode, where whether the sensor is rotated forwards or backwards,
the sensor will always count up. ...

enable_bidir_encoder enables the sensor is bidirectional mode, where rotating
the sensor in one direction will make the sensor value count up, and rotating in
the opposite direction will make the sensor count down.

...

int read_encoder(int sensor)

Returns an the current count for encoder of the specified sensor port. ...
void reset_encoder(int sensor)

Resets the count of the specified encoder to zero. ...

void setsensorperiod(int sensor, int period)

Changes the period of automatically sampling sensor. ...

disable_encoder(int sensor)

Disables the automatic sampling of the specified sensor.  This stops the
counting of encoder pulses. ..."

Regards,

Dirk



Message is in Reply To:
  Re: Simplifying Cygwin & brickOS/leJOS
 
Hi A while ago I looked at using IC for writing programs. At the time there were 2 major turnoffs. There was no support for rotation sensors and you needed to own one of the serial infrared towers. It was easy to install and it had its own firmware. (...) (21 years ago, 5-Nov-03, to lugnet.robotics.rcx, lugnet.robotics.rcx.legos, lugnet.robotics.rcx.java)

9 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