Skip to content
Snippets Groups Projects
controller.py 840 B
Newer Older
ft-Demo's avatar
ft-Demo committed
import asyncio
import fischertechnik.factories as rx_factory
from fischertechnik.logging import log as print

async def init(controller):
    global RX_I7_trail_follower
    global RX_I8_trail_follower
    global RX_M1_motor
    global RX_M2_motor
    global RX_I2C_1_gesture_sensor
    rx_factory.init_controller_factory()
    rx_factory.init_input_factory()
    rx_factory.init_motor_factory()
    rx_factory.init_i2c_factory()
    RX_I7_trail_follower = rx_factory.input_factory.create_trail_follower(controller, 7)
    RX_I8_trail_follower = rx_factory.input_factory.create_trail_follower(controller, 8)
    RX_M1_motor = rx_factory.motor_factory.create_motor(controller, 1)
    RX_M2_motor = rx_factory.motor_factory.create_motor(controller, 2)
    RX_I2C_1_gesture_sensor = rx_factory.i2c_factory.create_gesture_sensor(controller, 1)