Problems with Arduino Robot (Lottie Lemon) & Ultrasonic Sensor SEN136B5B (solved

Hello
I am newbie with official Arduino Robot (Lottie Lemon) and I am newbie in others too :D. When I try to run the sample program http://arduino.cc/en/Tutorial/RobotRunawayRobot I do not get it to work even when I modified the original program as

// read the value from the sensor
int sensorValue = Robot.digitalRead(sensorPin);

I use Ultrasonic Sensor SEN136B5B http://www.seeedstudio.com/wiki/index.php?title=Ultra_Sonic_range_measurement_module#Hardware_Installation

This is my code:

// include the robot library
#include <ArduinoRobot.h>

int sensorPin = TKD5; // pin is used by the sensor

void setup() {
// initialize the Robot, SD card, and display
Serial.begin(9600);
Robot.begin();
Robot.beginTFT();
Robot.beginSD();
Robot.displayLogos();

// draw a face on the LCD screen
setFace(true);
}

void loop() {
// If the robot is blocked, turn until free
while(getDistance() < 40) { // If an obstacle is less than 20cm away
setFace(false); //shows an unhappy face
Robot.motorsStop(); // stop the motors
delay(1000); // wait for a moment
Robot.turn(90); // turn to the right and try again
setFace(true); // happy face
}
// if there are no objects in the way, keep moving
Robot.motorsWrite(255, 255);
delay(100);
}

// return the distance in cm
float getDistance() {
// read the value from the sensor
int sensorValue = Robot.digitalRead(sensorPin);
//Convert the sensor input to cm.
float distance_cm = sensorValue*1.27;
return distance_cm;
}

// make a happy or sad face
void setFace(boolean onOff) {
if(onOff) {
// if true show a happy face
Robot.background(0, 0, 255);
Robot.setCursor(44, 60);
Robot.stroke(0, 255, 0);
Robot.setTextSize(4);
Robot.print(":)");
}else{
// if false show an upset face
Robot.background(255, 0, 0);
Robot.setCursor(44, 60);
Robot.stroke(0, 255, 0);
Robot.setTextSize(4);
Robot.print("X(");
}
}

I use the same sensor with Arduino Uno and I have no problem.
Sorry for my bad English.
Regards

i think we have the same problem...
have you access to a oscilloscope?

http://forum.arduino.cc//index.php?topic=192928.0

Right now I can not have access to an oscilloscope, but I intend to get it after reading your post. As soon as I can and get the results I will comment on your post.

http://forum.arduino.cc//index.php?topic=192928.0

I managed to find a solution by using the following library:
https://code.google.com/p/arduino-new-ping/

Adapting the example R07_Runaway_Robot to my convenience.

I also have a problem with the wheels, the axis or the wheels are off center, I'm no expert in electronics although in programming, but I reach to be able to distinguish some servos or motors with poor quality and which have given the robot are :D.

Regards.

:cold_sweat:

I try to further progress in my project, but now I see a conflict between the libraries <ArduinoRobot.h> & <Servo.h> (both originally delivered with the IDE)

Robot_Control\Melody.cpp.o: In function __vector_17': C:\Program Files (x86)\Arduino\libraries\Robot_Control/Melody.cpp:7: multiple definition of __vector_17'
Servo\Servo.cpp.o:C:\Program Files (x86)\Arduino\libraries\Servo/Servo.cpp:103: first defined here

I have a feeling that we have a hard way...