Difference between revisions of "Light (use with mDesigner)"
From Microduino Wiki
(Created page with "The Light sensor is a sensor which is able to detect light levels. Support for this sensor is found in mDesigner.") |
(→Analog Read Pin) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
The Light sensor is a sensor which is able to detect light levels. Support for this sensor is found in mDesigner. | The Light sensor is a sensor which is able to detect light levels. Support for this sensor is found in mDesigner. | ||
+ | =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_AnalogRead_Pins.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: #FDEDEC' | No | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin 1''' | ||
+ | | style='background: #FDEDEC' | No | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin 2''' | ||
+ | | style='background: #FDEDEC' | No | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin 3''' | ||
+ | | style='background: #FDEDEC' | No | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin 4''' | ||
+ | | style='background: #FDEDEC' | No | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin 5''' | ||
+ | | style='background: #FDEDEC' | No | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin 6''' | ||
+ | | style='background: #FDEDEC' | No | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin 7''' | ||
+ | | style='background: #FDEDEC' | No | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin 8''' | ||
+ | | style='background: #FDEDEC' | No | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin 9''' | ||
+ | | style='background: #FDEDEC' | No | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin 10''' | ||
+ | | style='background: #FDEDEC' | No | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin 11''' | ||
+ | | style='background: #FDEDEC' | No | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin 12''' | ||
+ | | style='background: #FDEDEC' | No | ||
+ | | | ||
+ | |- | ||
+ | | '''Pin 13''' | ||
+ | | style='background: #FDEDEC' | No | ||
+ | | | ||
+ | |- | ||
+ | | '''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= | ||
+ | ==Analog Read Pin== | ||
+ | This block reads the value of the pin. A value between 0 and 1023 will be returned. In Arduino, this is known as an analog read (analogRead). | ||
+ | {| class="wikitable" | ||
+ | |+Light Sensor State Table | ||
+ | |- | ||
+ | ! Light Amount | ||
+ | ! Value Produced | ||
+ | |- | ||
+ | |No Light | ||
+ | |<200 | ||
+ | |- | ||
+ | |Finger Covering the Sensor | ||
+ | |200~300 | ||
+ | |- | ||
+ | |Ambient Light | ||
+ | |700~900 | ||
+ | |- | ||
+ | |10 Inches from the Sun | ||
+ | |1023 | ||
+ | |} | ||
+ | ::[[File:MDesigner_Analog_Read.png]] | ||
+ | :*'''Pin Number''' - the pin number to read from. |
Latest revision as of 20:58, 7 June 2018
The Light sensor is a sensor which is able to detect light levels. Support for this sensor is found in mDesigner.
Compatible Pins
The following pins on the Hub or mCenter+'s Hub support this module:
Pin Name | Compatibility | Notes |
---|---|---|
Pin 0 | No | |
Pin 1 | No | |
Pin 2 | No | |
Pin 3 | No | |
Pin 4 | No | |
Pin 5 | No | |
Pin 6 | No | |
Pin 7 | No | |
Pin 8 | No | |
Pin 9 | No | |
Pin 10 | No | |
Pin 11 | No | |
Pin 12 | No | |
Pin 13 | No | |
Pin A0 | Yes | |
Pin A1 | Yes | |
Pin A2 | Yes | |
Pin A3 | Yes | |
Pin A6 | Yes | |
Pin A7 | Yes | |
Pin I2C | No |
Blocks
Analog Read Pin
This block reads the value of the pin. A value between 0 and 1023 will be returned. In Arduino, this is known as an analog read (analogRead).
Light Amount | Value Produced |
---|---|
No Light | <200 |
Finger Covering the Sensor | 200~300 |
Ambient Light | 700~900 |
10 Inches from the Sun | 1023 |