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 board.init() sel = (1,) rel_e = board.next_expansion(relay,sel) rel_e.relay_off(rel_e.OUT1) rel_e.relay_off(rel_e.OUT2) rel_e.relay_off(rel_e.OUT3) rel_e.relay_on(rel_e.OUT4) rel_e.relay_on(rel_e.OUT5) rel_e.relay_on(rel_e.OUT6)