Browse Source

Make goCrazy() use the new table class

master
Elis Axelsson 4 years ago
parent
commit
9301d08ca5
  1. 21
      code/main.py

21
code/main.py

@ -1,23 +1,22 @@
from pinouts import NodeMCU as pins
from table import Table
import time
import machine
def goCrazy():
table = Table()
table.move(0)
while True:
print("Lowest Distance: " + str(getDistance()))
print("Movement: " + str(getMovement()))
print("Lowest Distance: " + str(table.currentHeight()))
print("Movement: " + str(table.getMovement()))
toggleRaiseUp()
table.move(1)
time.sleep(3)
print("Highest Distance: " + str(getDistance()))
print("Movement: " + str(getMovement()))
print("Highest Distance: " + str(table.currentHeight()))
print("Movement: " + str(table.getMovement()))
toggleRaiseUp()
toggleLowerDown()
table.move(-1)
time.sleep(3)
toggleLowerDown()

Loading…
Cancel
Save