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
}