We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0156c7 commit 00c7e9bCopy full SHA for 00c7e9b
quadripod.ino
@@ -190,7 +190,11 @@ void loop()
190
191
192
if (cycle==5){
193
- // No delay
+ // No delay
194
+ if (dir==FORWARD) {
195
+ distance = readDist();
196
+ }
197
+
198
} else {
199
if(dir==LEFT or dir==RIGHT){
200
delay(looptime*robotspeed);
@@ -218,11 +222,6 @@ void loop()
218
222
}
219
223
220
224
221
- if (cycle==5) {
- if (dir==FORWARD) {
- distance = readDist();
- }
225
226
227
if (distance < 40){
228
digitalWrite(ledPin, HIGH);
0 commit comments