Hello all,
I wail back I posted some information on using an Arduino as a I2C Sensor controller to use with the EZB3&4
I will post this in 3 stages ..
Stage one.. right here right now.
In this video you can see how im using the arduino to read the ultrasonic sensor . that in turn is being read by the EZB board via I2C.
This is the only code needed to read the ping for the EzBuilder script
print(I2CRead(0, 2,6 ))
The code for the Arduino is
#include
void setup()
{
Wire.begin(2);
Wire.onRequest(requestEvent);
}
void loop()
{
delay(100);
}
void requestEvent()
{
long duration, inches, cm;
pinMode(9, OUTPUT);// attach pin 3 to Trig
digitalWrite(9, LOW);
delayMicroseconds(2);
digitalWrite(9, HIGH);
delayMicroseconds(5);
digitalWrite(9, LOW);
pinMode (8, INPUT);//attach pin 4 to Echo
duration = pulseIn(8, HIGH);
// convert the time into a distance
inches = microsecondsToInches(duration);
cm = microsecondsToCentimeters(duration);
String outtoezb;
outtoezb += "D1=";
outtoezb += inches;
outtoezb += ":";
char tempout[outtoezb.length() + 1];
outtoezb.toCharArray(tempout,outtoezb.length() + 1);
Wire.write(tempout);
}
long microsecondsToInches(long microseconds)
{
return microseconds / 74 / 2;
}
long microsecondsToCentimeters(long microseconds)
{
return microseconds / 29 / 2;
}
Phase two will be adding the 3 other ping sensors and a temp sensor to the arduino . I hope to have it all encased together will plugs and off the project board.
I will follow up on this thread as the next phase is done I will provide the code for EzBuilder as well as the arduino code.
Hope yall can use it.
By Luis Vazquez
— Last update
Other robots from Synthiam community

Animator28's AVA (Advanced Visual Android)
Hi guys I am building a humansized humanoid robot. Called AVA. All 3d printed And open source. here are the free files...

Steve's Using Exec() Commands To Help Make A Game
K-9 asks Would you like to play a game? So from the famous(ish) line from the movie War Games, I have taught K-9 a...

Dave's New Building System At Servocity, Gobilda
Hi Everyone. I hope this is not considered taboo to post this. It is not Spam. I do not work for these guys. Its just a...
Any updates for using more then 1 ping sensor?
This is a very old deprecated thread. You can use as many ping sensors as the hardware supports. The ARC software supports arduino connections directly. Check the getting started guide (link on top of this website) for information.