Difference between revisions of "IR Controller (use with mDesigner)"
From Microduino Wiki
(Created page with ".") |
(→IR Controller - State) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | . | + | 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 '''I'''nf'''R'''ared. Support for this module combo is found in mDesigner. |
+ | |||
+ | {| class="wikitable" style="background-color:#FEF9E7;" | ||
+ | |'''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: | ||
+ | <div style="width: 80%;"> | ||
+ | <div style="float: left;">[[File:Hub_Digital_Pins_v2-01.png|thumb|600px]]</div> | ||
+ | <div style="float: left;"> | ||
+ | {| class="wikitable" style="text-align: left;" | ||
+ | |- | ||
+ | ! scope="col"| Pin Name | ||
+ | ! scope="col"| Compatibility | ||
+ | ! scope="col"| Notes | ||
+ | |- | ||
+ | | '''Pin 0''' | ||
+ | | style='background: #FEF9E7' | Yes | ||
+ | | Not recommended, Pin 0 & 1 used by mDesigner (serial communication). | ||
+ | |- | ||
+ | | '''Pin 1''' | ||
+ | | style='background: #FEF9E7' | Yes | ||
+ | | Not recommended, Pin 0 & 1 used by mDesigner (serial communication). | ||
+ | |- | ||
+ | | '''Pin 2''' | ||
+ | | style='background: #EAFAF1' | Yes | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin 3''' | ||
+ | | style='background: #EAFAF1' | Yes | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin 4''' | ||
+ | | style='background: #EAFAF1' | Yes | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin 5''' | ||
+ | | style='background: #EAFAF1' | Yes | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin 6''' | ||
+ | | style='background: #EAFAF1' | Yes | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin 7''' | ||
+ | | style='background: #EAFAF1' | Yes | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin 8''' | ||
+ | | style='background: #EAFAF1' | Yes | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin 9''' | ||
+ | | style='background: #EAFAF1' | Yes | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin 10''' | ||
+ | | style='background: #EAFAF1' | Yes | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin 11''' | ||
+ | | style='background: #EAFAF1' | Yes | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin 12''' | ||
+ | | style='background: #EAFAF1' | Yes | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin 13''' | ||
+ | | style='background: #EAFAF1' | Yes | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin A0''' | ||
+ | | style='background: #EAFAF1' | Yes | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin A1''' | ||
+ | | style='background: #EAFAF1' | Yes | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin A2''' | ||
+ | | style='background: #EAFAF1' | Yes | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin A3''' | ||
+ | | style='background: #EAFAF1' | Yes | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin A6''' | ||
+ | | style='background: #EAFAF1' | Yes | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin A7''' | ||
+ | | style='background: #EAFAF1' | Yes | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin I2C''' | ||
+ | | style='background: #FDEDEC' | No | ||
+ | | | ||
+ | |} | ||
+ | |||
+ | </div> | ||
+ | <br style="clear: left;" /> | ||
+ | </div> | ||
+ | |||
+ | =Blocks= | ||
+ | ==IR Controller - State== | ||
+ | This block checks if the IR Receiver connected to '''pin number''' with '''key''' of interest is at a '''state'''.<br>If the check conditions are met (true), then a boolean '''true''' is returned. If the check fails, then a boolean '''false''' is returned. | ||
+ | {| class="wikitable" style="background-color:#FEF9E7;" | ||
+ | |'''Note:''' An IR Receiver '''CANNOT''' be used in the same project as a '''Buzzer''' as they use the same timer resource. | ||
+ | |} | ||
+ | |||
+ | ::[[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.) |
Latest revision as of 21:50, 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 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. |
-
- 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.)