adlef
May 16, 2014, 3:11am
1
Hi everyone,
I’m working on the ultrasonic sensors coming from the nexus robot 4WD and I don’t receive any data.
Thanks to the library given with it, I could write a simple code for one sensor:
SONAR sonar11(0x11),sonar12(0x12),sonar13(0x13),sonar14(0x14);
void setup()
{
SONAR::init();
}
void loop()
{
sonar12.trigger();
delay(SONAR::duration);
Serial.println(sonar12.getDist(),DEC);
sonar12.showDat();
delay(500);
}
The only reply I have is this one:
Uª Uª 65535
0 0 0 0 0 0 0 0
adlef
May 16, 2014, 3:13am
2
Could you help me? Thank you very much!
Some of the examples in the manufacturer’s manual has a different line for the SONAR::init() line and do:
SONAR::init(13);
Can you try that?
adlef
May 18, 2014, 9:21am
4
Hi,
I already tried this and it didn’t work too
Thanks anyway
We have asked the manufacturer to take a look at your problem and will let you know their recommendations as soon as they respond.
Best,
We received the following response from the manufacturer:
I have test the code and it works in robot kit 10011, This error happens when the Sensor address can’t be found.
Would you please have the customer to try s11 to s13, and check the jumper and connection correctly. and if it doesn’t work, can you try to set address to the sensor according the page 27-29 of attached user manual.
Robot Kits Manual_006.pdf (2.38 MB)
Can you give this a try?