Created an object for the expansion board connected to Zerynth ZM1 board at the
position number, counting from left to right. Valid positions are 1 to 4.
selectors is a tuple composed as in the following:
- Port Expansion (PE) address.
- Interrupt pin.
EXP object is created, the expansion board can be used from the application by using the
Both values are integers from 0 to 3.
relis the RELAY to open.
relis the RELAY to close.
outis the RELAY to check.
Return 1 if the RELAY is on. 0 otherwise.
from bsp import board from expansions import relay import gpio board.init() sel = (1,) rel_e = board.next_expansion(relay,sel) gpio.low(rel_e.OUT1) gpio.low(rel_e.OUT2) gpio.low(rel_e.OUT3) gpio.low(rel_e.OUT4) gpio.low(rel_e.OUT5) gpio.low(rel_e.OUT6)