diff options
| -rw-r--r-- | arduino/arduino.ino | 2 | ||||
| -rwxr-xr-x | main.py | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/arduino/arduino.ino b/arduino/arduino.ino index 5ab3c43..c4c6c99 100644 --- a/arduino/arduino.ino +++ b/arduino/arduino.ino @@ -163,7 +163,7 @@ void loop() { } lcd.setCursor(13, 0); lcd.print(dir); - lcd.setCursor(0, 1); + lcd.setCursor(1, 1); lcd.print("x:"); lcd.print(xstatus); lcd.print(", y:"); @@ -35,22 +35,26 @@ def adjustAngle(adiff, f, b): print("Adjusting to the right") NANO.write(b"Right\n") sleep(abs(adiff) / 90) + NANO.write(b"Stop\n") elif adiff > 10: print("Adjusting to the left") NANO.write(b"Left\n") sleep(abs(adiff) / 90) + NANO.write(b"Stop\n") elif b == True: print("Going backward") if adiff > 10: adiff -= 180 print(f"Adjusting to the right {adiff}") - # NANO.write(b"Right\n") - # sleep(abs(adiff) / 90) + NANO.write(b"Right\n") + sleep(abs(adiff) / 90) + NANO.write(b"Stop\n") elif adiff < -10: adiff += 180 print(f"Adjusting to the left {adiff}") - # NANO.write(b"Left\n") - # sleep(abs(adiff) / 90) + NANO.write(b"Left\n") + sleep(abs(adiff) / 90) + NANO.write(b"Stop\n") def writeAngleToFile(a): with open("angle_buf.txt", "w") as f: |
