# Would is be possible to connect a HiTechnic prototype board to an Arduino?

Does anyone know if this is possible? It's just an i2c device right? I mean you would have to cut the cable and make it so you could plug into the pins on the Arduino but you should just be able to use the wire library and say something like.

Wire.beginTransmission(0x10);


the NXT hardware developers kit tells you what pins are which http://mindstorms.lego.com/en-us/support/files/default.aspx

Thanks

EDIT. Turns out this is very possible. The main problem was that HiTechnic says the address is 0x10 and it is actually 0x08 but here is a short sketch that reads and prints some into about the device, i.e. the manufacturer and version.

#include <Wire.h>

void setup()
{
Wire.begin();
Serial.begin(9600);
}

void loop()
{
Serial.println();
Serial.println();
Serial.println();

Serial.println("-----------------------------");

delay(1000);
}

{
Wire.endTransmission();

while(Wire.available())
{
Serial.print(c);
}
}


Per the schematics of the UltraSonic Sensor the P1.3/SCL is DIGIAI0 or J1.5 and P3.0/SDA is DIGIAI1 or J1.6. And the developer Kit Manual states it is I2C as per philips original standard, detailing all the memory address's of the ESC015 chip and with all the recommended interfacing circuitry. The only note that I see is that they state the I2C's SCL is 9600. Kind of slow. But all very do-able for an Arduino. check out http://www.openelectrons.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=7 as they have a shield to directly connect and libraries for the Arduino.

• Thanks! Two quick questions. Where did you find the schematics of the UltraSonic Sensor? I saw the PDF with the command protocols in it but no schematic. Also (Just for fun) I want to try hacking it directly into the Arduino - (although I am sure i will get a shield at some point). Shouldn't I just be able to use the wire library already in the Uno?
– Kenn
Feb 7 '13 at 15:18
• I don't see a schematic. but the pictures show no extra chips. And I believe it should be straight up simple wiring. So it should be simple enough to just wire it up with out the shield. Feb 7 '13 at 16:03
• I found on page 9 of the HDK where is explains pin 5 is the CLK and pin 6 is the DATA line, I am assuming the prototypeboard takes 5 volts? shrug guess I will find out, I will let you know if smokes :) and again, I don't think I even need to analog wire (pin 1) on page 6 of the HDK pdf. Thanks for you advice.
– Kenn
Feb 7 '13 at 16:54

According to the HiTechnic page for the prototype board it communicates with the NXT brick. As such it is possible for the Arduino to communicate with it. The one caveat would be whether they have correctly implement I2C. If they haven't then you likely could still use it but it would take additional work.

• I can see from the NXT HDK that pin 5 and 6 are used for I2C communication anyone know which is clock and which is data? Also. I assume in this case I don't need pin 1, the analog input right? this is all coming from page 6 of the HDK pdf.
– Kenn
Feb 7 '13 at 13:32