dmcomm.hardware¶
Communication with pronged and infrared Digimon toys, for CircuitPython on RP2040.
Note: This API is still under development and may change at any time.
- dmcomm.hardware.WAIT_FOREVER = -2¶
Value to pass to receiving functions indicating there is no timeout.
- dmcomm.hardware.WAIT_REPLY = -1¶
Value to pass to receiving functions indicating the default reply timeout.
- class dmcomm.hardware.Controller¶
Main class which controls the communication.
The constructor takes no parameters.
- register(io_object) None ¶
Registers pins for a particular type of input or output.
Each type should only be provided once.
- Parameters
io_object – One of the Input or Output types provided.
- execute(digirom) None ¶
Carries out the communication specified.
- Parameters
digirom – The DigiROM to execute.
- Raises
CommandError – If the required pins for the selected signal type are not registered.
ReceiveError – If a broken transmission was received.
- class dmcomm.hardware.ProngOutput(pin_drive_signal, pin_weak_pull)¶
Description of the outputs for the RP2040 prong circuit.
- Parameters
pin_drive_signal – The first pin to use for signal output. Note that pin_drive_low=pin_drive_signal+1 due to the rules of PIO.
pin_weak_pull – The pin to use for the weak pull-up / pull-down.
- class dmcomm.hardware.ProngInput(pin_input)¶
Description of the input for the RP2040 prong circuit.
- Parameters
pin_input – The pin to use for input.
- class dmcomm.hardware.InfraredOutput(pin_output)¶
Description of the infrared LED output.
- Parameters
pin_output – The pin to use for output.
- class dmcomm.hardware.InfraredInputModulated(pin_input)¶
Description of the modulated infrared input (TSOP4838 recommended).
- Parameters
pin_input – The pin to use for input.
- class dmcomm.hardware.InfraredInputRaw(pin_input)¶
Description of the non-modulated infrared input (TSMP58000 recommended).
- Parameters
pin_input – The pin to use for input.
- class dmcomm.hardware.TalisInputOutput(pin)¶
Description of the Talispod/dam input/output.
- Parameters
pin – The pin to use for input and output.
Generated from git commit: 2023-05-06 v0.7.0