Rename move() to triggerRelay()

master
Elis Axelsson 2017-08-21 19:52:36 +02:00
parent cfba49cff8
commit 2fb13b33cb
2 changed files with 5 additions and 5 deletions

View File

@ -70,13 +70,13 @@ from table import Table
table = Table()
# Reset relays
table.move(0)
table.triggerRelay(0)
# Move table up
table.move(1)
table.triggerRelay(1)
# Move table down
table.move(-1)
table.triggerRelay(-1)
# To go up and down and measure distance and stuff at the same time
import main

View File

@ -16,7 +16,7 @@ class Table:
self.relay_down = machine.Pin(pins.D6, mode=machine.Pin.OUT)
# Reset both relays on set up
self.move(0)
self.triggerRelay(0)
def currentHeight(self):
@ -40,7 +40,7 @@ class Table:
return self.movement_sensor.value()
def move(self, direction):
def triggerRelay(self, direction):
"""
Direction should be an integer:
- 1 to move up