IR Controller (use with mDesigner)

From Microduino Wiki
Revision as of 21:50, 28 June 2018 by Sonny (talk | contribs) (IR Controller - State)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The IR Receiver is a sensor capable of detecting signals from an IR Remote Control. The IR Receiver is able to decode infrared signals. IR stands for InfRared. Support for this module combo is found in mDesigner.

Note: An IR Receiver CANNOT be used in the same project as a Buzzer as they use the same timer resource.

Compatible Pins

The following pins on the Hub or mCenter+'s Hub support this module:

Hub Digital Pins v2-01.png
Pin Name Compatibility Notes
Pin 0 Yes Not recommended, Pin 0 & 1 used by mDesigner (serial communication).
Pin 1 Yes Not recommended, Pin 0 & 1 used by mDesigner (serial communication).
Pin 2 Yes
Pin 3 Yes
Pin 4 Yes
Pin 5 Yes
Pin 6 Yes
Pin 7 Yes
Pin 8 Yes
Pin 9 Yes
Pin 10 Yes
Pin 11 Yes
Pin 12 Yes
Pin 13 Yes
Pin A0 Yes
Pin A1 Yes
Pin A2 Yes
Pin A3 Yes
Pin A6 Yes
Pin A7 Yes
Pin I2C No


Blocks

IR Controller - State

This block checks if the IR Receiver connected to pin number with key of interest is at a state.
If the check conditions are met (true), then a boolean true is returned. If the check fails, then a boolean false is returned.

Note: An IR Receiver CANNOT be used in the same project as a Buzzer as they use the same timer resource.
MDesigner IR Controller State.png
  • Pin Number - the pin IR Receiver is connected to.
  • Key - the key / button of interest.
  • State - the state to check for.
  • released - if the key of interest is not being pressed.
  • pressed - if the key of interest has been pressed as some point. The pressed at some point is reset when the block checks for this condition.
  • pressing - if the key of interest is currently being held down at the time of checking. (As opposed to pressed, which happened at some point.)