Mecanum wheel kit (nexus robot) - ultrasonic problem

Hi,

Ultrasonic sensor worked well.
Now it does not work - be glad to hear your advise.

Power is off, USB cable connected, jumpers on expansion board are set for RS485
When connecting the USB cable the ultrasonic green led flash 4 times which states the sensor is alive (all four of them.
SONAR = s12=SONAR(0x12);


serial.println(s12.getdist());
s12.showDat();
When I try download it the output is this:
U^2 U^2 65535
U^2 -1
00000000

When power is on the lower line output changed to:
FB D9 000000
Then if I turn power off again, it goes back to 00000000.

When I changed sonar to s11=SONAR(0x11), then the data changes to : FB DB 000000 (again only when power is on).

Yesterday, the data was good and it showed me the correct distance.

When trying the arduino with the other test programs (i.e. 4WD drive) it works well (without useage of ultrasonic)

I have no idea what happened and why the ultrasonic does not work properly.

I tried to download it using arduino 1.0 and also with arduino 0022 - did not help.
I tried pressing the reset button many times before downloading the program - did not help.

Could you advise?
Do I need to burn the bootloader again?
Do I need to do something else? Will appreciate your help - I am frustrated.

Thanks,

Hen.

built-in serial port? the baurate is the default 19200 that normal is used

does the serial screen work when the sonars is conected to RS485?


i have the 4WD Mecanum wheel mobile robot kit. the sensors is connected true 485RS and the jumbers is like the photo below. the code i use is the examble that is given. thanks for the reply. i hope that you can help…

the code is

SONAR s11=SONAR(0x11);

void setup() {
SONAR::init();
delay(100);

}

void loop() {
s11.trigger();
delay(SONAR::duration);
Serial.println(s11.getDist(),DEC);
s11.showDat();
Serial.println(s11.getTemp(),DEC);

}

i have the same problem but no solution… the ultrasonic sonars dont seems to give data… if someone have a solution please post it here…

i did run a code to manage only the sensors but it does not work. i cant read the sonar and the data i recieve is 65535
i check the conections, the jumbers but still nothing. the sonar is blinking 4 times at the start up.
i think that is problem with the RS485. any ideas?

Unfortunately we’re not in a position to troubleshoot code (its very time intensive). Perhaps another member on the forum has a suggestion? It’s doubtful you need to burn the bootloader again - you need to separate the Arduino and the Ultrasonic sensor from everything else and try to get the two running again.

What kit do you have or do you just have separate products? Can you take a photo of your connections and/or describe how the sensor is connected?

Do you have the same kit? Can you provide more details? Can you create code to read the sensors alone (and do nothing else) to see if they work?

Have you set the baudrate and communication pins for the sonar? Normally you need to use the built-in serial port (pins 0 and 1)

Did anybody found a solution for that problem?
It seems RS485 communication is down!?
UDSensors blink when powered on, but wired stuff is received on Serialport.
Its better with 19200, but still useless information.