Ultraborg + Picoborg

Forums:

Is it possible to control the motors connected to the Picoborg from Ultraborg with ultrasonic distance sensor (HC-SR04)?

piborg's picture

Yes, you can use the sensor readings to control the motor outputs from PicoBorg.

If you use the ubServoFromDistances.py script from UltraBorg example as a starting point.
What you want to do is change the servoX values to be between 0 and PWM_MAX (100 in our examples).

You can then pass the value(s) on to wiringpi to control the motor outputs.
See the 4dc_gui.py script for setting up the PicoBorg and use the wiringpi.softPwmWrite calls to set the motor speed(s).

Thanks! I'll take a look at it.

Subscribe to Comments for "Ultraborg + Picoborg"