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.
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…
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.
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.