Subject:
|
Parallel sensor problem
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Tue, 23 Jan 2001 11:30:51 GMT
|
Viewed:
|
1532 times
|
| |
| |
Hi, all.
I'm experiencing a strange problem. I'm using two RCXs to control my crane, and
I have a single touch sensor connected to input 1 on RCX 1 & input 2 on RCX 2.
However, when I run both programs, which both have a wait_event function like:
static wakeup_t button_pressed(wakeup_t button_num) {
switch ((unsigned int)button_num) {
case 1:
return (SENSOR_1<0xf000);
case 2:
return (SENSOR_2<0xf000);
case 3:
return (SENSOR_3<0xf000);
}
return 0;
}
the one or the other seems to run really slow. Also the program running slow
seems to think that the sensor is pressed when it isn't. The display refresh is
really slow, too. If I disconnect it from either RCX, both work fine.
[more experiments done]
Both programs work OK until one switches on a motor! As soon as that happens
the *other* program does the slow-down! When the motor stops, correct
functioning returns! But this *only* happens when the sensor is connected to
both inputs!
Note that this isnt the only sensor attached to either RCX - one has two light
sensors, the other a rotation sensor. None of these are "shared" though.
Anyone got any ideas?
ROSCO
|
|
Message has 1 Reply: | | Re: Parallel sensor problem
|
| (...) I don't know if this is your problem, but the input ports have polarity (one lead is connected to ground and the other to +5V through a resistor, if I remember correctly). Have you tried to change polarities? (...) Maybe the problem is not in (...) (24 years ago, 23-Jan-01, to lugnet.robotics.rcx.legos)
|
4 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|