EasyManua.ls Logo

pitsco TETRIX PULSE

pitsco TETRIX PULSE
146 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Block-Text Correlation
void setup() {
pulse.PulseBegin();
pulse.setMotorInvert(1,1);
if (pulse.readSonicSensorCM(3) > 25) {
pulse.setMotorPowers(50,50);
} else if (pulse.readSonicSensorCM(3) < 25) {
pulse.setMotorPowers(0,0);
Note: The bot will drive forward until it encounters
an obstacle 25 cm away, and then it will brake.
Arduino Source Code
#include <PULSE.h>
PULSE pulse;
void setup() {
pulse.PulseBegin();
pulse.setMotorInvert(1,1);
}
void loop() {
if (pulse.readSonicSensorCM(3) > 25) {
pulse.setMotorPowers(50,50);
} else if (pulse.readSonicSensorCM(3) < 25) {
pulse.setMotorPowers(0,0);
}
}
Building and Coding the PULSE CodeeBot 115

Related product manuals