zauberzeug / lizard

Domain-specific language to specify behaviour of microcontroller managed hardware
MIT License
15 stars 5 forks source link

Implement new MotorAxis module #15

Closed falkoschindler closed 1 year ago

falkoschindler commented 1 year ago

The main goal of this module is to quickly respond to switches and protect the hardware from damage - even if, for example, no RoSys is running, a different serial interface is being used, or a developer sends "manual" commands via the Lizard console.

Tasks:

falkoschindler commented 1 year ago

Test configuration on RB28 (motor on socket 2, sensors on socket 4):

rdyp = Output(15)
en3 = Output(12)
en3.on()
rdyp.on()

m = StepperMotor(5, 4)

serial = Serial(26, 27, 115200, 1)
p0 = Expander(serial, 25, 14)

in1 = p0.Input(32)
in2 = p0.Input(33)

a = MotorAxis(m, in1, in2)