ARDUINO MEGA Functions Sensors
(→SensorValue) |
|||
| Line 48: | Line 48: | ||
| class="functionType"| <span class="bigKeywordBI">word </span><span class="bigKeywordB">SensorValue</span><span class="bigCodePunc">[</span><span class="bigCodeBasic">tSensors sensor</span><span class="bigCodePunc">]</span> | | class="functionType"| <span class="bigKeywordBI">word </span><span class="bigKeywordB">SensorValue</span><span class="bigCodePunc">[</span><span class="bigCodeBasic">tSensors sensor</span><span class="bigCodePunc">]</span> | ||
|- | |- | ||
| − | | style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;"|([[Data_Types#dataType_word|word]]) This array value | + | | style="font-family:Verdana, Geneva, sans-serif; color:black; background-color:#FFFFFF; text-align:left; font-size:100%;"|([[Data_Types#dataType_word|word]]) This array value will return and modify the value of the sensor. When a pin is set as an "input" the SensorValue array command will return the value from the sensor attached to that pin. When a pin is set as an "output", the SensorValue array can be written to set the output value of the pin (typically Digital Outs will be set to 0 for Low and 1 for High). |
| − | + | ||
{| class="parameterTable" cellpadding="5%" width="100%" | {| class="parameterTable" cellpadding="5%" width="100%" | ||
| Line 61: | Line 60: | ||
|- | |- | ||
|} | |} | ||
| − | |||
{| | {| | ||
Revision as of 19:02, 9 May 2012
ARDUINO → Functions and Variables → ARDUINO MEGA Functions Sensors
|
| |||||||
Information
| The Arduino MEGA has 16 analog sensor ports and 53 digital sensor ports. |
SensorType
| TSensorTypes SensorType[tSensors sensor] | |||||||
| (TSensorTypes) The SensorType array is used to specify what type of sensor is connected to a certain port. Most users should not have to use this functionality and should use the Motors and Sensor Setup instead.
|
SensorValue
| word SensorValue[tSensors sensor] | |||||||
(word) This array value will return and modify the value of the sensor. When a pin is set as an "input" the SensorValue array command will return the value from the sensor attached to that pin. When a pin is set as an "output", the SensorValue array can be written to set the output value of the pin (typically Digital Outs will be set to 0 for Low and 1 for High).
|