Go Down

Topic: multiple maxbotix LVEZ on one UNO? (Read 5 times) previous topic - next topic

oric_dan


I think the 4-5 sec delay on Leds you mention is simply because your range check covers 14 - 36".

I wouldn't remove the delay, but you might shorten it to 50-msec - per the EZ datasheet.

Also, the Maxsonar 9600 bps is only if you use the RS232 mode output, which you're not using.

TeslaIaint

#36
Mar 18, 2012, 07:01 am Last Edit: Mar 18, 2012, 07:13 am by TeslaIaint Reason: 1
Quote
I think the 4-5 sec delay on Leds you mention is simply because your range check covers 14 - 36".


Can you elaborate on this?



The following code cuts the delay to about 2 seconds from the longer delay. I don't care about the LED's but at the moment they are simulating motors.

Code: [Select]
 for(int i = 0; i < arraysizeR; i++)
 {    
   digitalWrite(TriggerR, HIGH);
   delayMicroseconds(200);
   digitalWrite(TriggerR, LOW);
   pulseR = pulseIn(SonarR, HIGH);
   rangevalueR[i] = pulseR/147;
   delay(50);
   


Do you agree with these delays?


oric_dan

Delays look good.

Quote

But unfortunately the code only works good for a stationary robot ranging a stationary target (21" x 21" box. There's a 4-5 second lag to change the led's to reflect the change in range if I move the robot closer or farther away.


I guess I didn't understand what this meant.


Iolanda

Hello! I am working on a project on human presence detection. I have ordered 2 maxbotix ez3 an arduino uno and a buzzer. I want my sensors to detect presence one at a time so that I can detect when the person is inside a room. I can't find the tutorial where I connect the to sensors to the Arduino Uno. Please, can you help me?

Go Up