Difference between revisions of "IR Controller (use with mDesigner)"
From Microduino Wiki
(→Compatible Pins) |
|||
Line 104: | Line 104: | ||
<br style="clear: left;" /> | <br style="clear: left;" /> | ||
</div> | </div> | ||
+ | |||
+ | =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 is turn, then a boolean '''true''' is returned. If the check fails, then a boolean '''false''' is returned. | ||
+ | {| class="wikitable" style="background-color:#FEF9E7;" | ||
+ | |'''Note:''' The angle is relative to where the Servo's horn has been place. Therefore, it is recommended to calibrate the angle first by setting the angle to 0, then placing the Servo horn. | ||
+ | |} | ||
+ | ::[[File: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.) |
Revision as of 21:47, 28 June 2018
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:
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 is turn, then a boolean true is returned. If the check fails, then a boolean false is returned.
Note: The angle is relative to where the Servo's horn has been place. Therefore, it is recommended to calibrate the angle first by setting the angle to 0, then placing the Servo horn. |
-
- 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.)