Maxbotix EZ1


#1

Has anyone connected a Maxbotix EZ1 to the Grove PI? I figured I would ask before I purchase a Grove PI.

When using on an Arduino you either do Analog
void read_sensor (){
anVolt = analogRead(anPin);
mm = anVolt*5; //Takes bit count and converts it to mm
inches = mm/25.4; //Takes mm and converts it to inches
}

or you can do PWM

void read_sensor (){
sensor = pulseIn(pwPin1, HIGH);
mm = sensor; //Takes the pulse width and tells Arduino it is equal to millimeters
inches = mm/25.4; //Takes mm and converts it to inches
}


#2

Hey,
The GrovePi should be able to read with the AnalogRead easily but the pulseIn would be a bit difficult to use. Also, you might need a cable like this http://www.seeedstudio.com/depot/Grove-4-pin-Male-Jumper-to-Grove-4-pin-Conversion-Cable-5-PCs-per-Pack-p-1565.html?cPath=98_106_57 or you could just strip and use a Grove cable .

-Karan