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 / 20349
20348  |  20350
Subject: 
Help with events
Newsgroups: 
lugnet.robotics
Date: 
Thu, 27 Feb 2003 20:08:55 GMT
Original-From: 
Camp0s <camp0s@libero.itSPAMLESS>
Viewed: 
612 times
  
Hy to all,

i was just trying to do a robot which can help me and my friends in the lab
school. We are doing measures on a pendulum (if the word is right), the
teacher said that we have to do about 450 readings of the time which the
pendulum makes 20 go and back from right to left (you know what a mean). Now
it's a repetitive, precision and boring task. So a thought why not telling
my favourite Lego brick to do the job right for me ?

I put a light back to the pendulum and the brick with the light sensor in
front of it.

I setted and up Event to react when the pendulum cover the light beam and
the light sensor read a darker value.

SetSensor (SENSOR_2, SENSOR_LIGHT);
SetEvent (1,SENSOR_2,EVENT_TYPE_LOW);
SetLowerLimit(1,50);
SetUpperLimit(1,80);

This is what a first written in BricxCC, BUT, i'm getting a:

"Undefined variable EVENT_TYPE_LOW"

What does this mean ?

And do you have any other suggestion on how to have better readings of the
pendulum oscillations ? Maybe not using events ?

Thanks to all.

Camp0s.



Message has 1 Reply:
  Re: Help with events
 
(...) Yes - an excellent job for automation. (...) I thought it was 'EVENT_TYPE_PRESSED' - but then I didn't think it worked with light sensors. Did you tell the compiler to make the code for RCX 2? I don't think there is event support in RCX 1. (...) (22 years ago, 27-Feb-03, to lugnet.robotics)

2 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