You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
483 B

from pinouts import NodeMCU as pins
from hcsr04 import HCSR04
import machine
class Table:
def __init__(self):
# Distance sensor
self.hcsr04 = HCSR04(trigger_pin=pins.D2, echo_pin=pins.D3)
# Movement sensor
self.movement_sensor = machine.Pin(pins.D4, mode=machine.Pin.IN)
# Relay to move up and down
self.relay_up = machine.Pin(pins.D5, mode=machine.Pin.OUT)
self.relay_down = machine.Pin(pins.D6, mode=machine.Pin.OUT)