ARDUINO MEGA Functions Sensors
(→Information) |
|||
| Line 6: | Line 6: | ||
{| class="wikiText" border="0" | {| class="wikiText" border="0" | ||
|- | |- | ||
| − | |The | + | |The Arduino MEGA has 16 analog sensor ports and 53 digital sensor ports. |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
|- | |- | ||
|} | |} | ||
Revision as of 18:57, 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. |
SensorBoolean
| const word SensorBoolean[tSensors sensor] | |||||||
| (word) This returns a true or false reading from the sensor. (Mostly used by Touch sensors).
|
SensorRaw
| word SensorRaw[tSensors sensor] | |||||||
| (word) This array value will return the "raw" (un-normalized) value of a sensor. Usually this is the raw A-D converted value, which is an analog value between 0 to 1023.
|
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 returns the value of the sensor in a normalized fashion. Rather than returning a raw value of 0 to 1023, ROBOTC will interpret the data from the "SensorType" and return a more accurate representation of the sensor's data. An example of this is the Light Sensor, which will return a percentage value from 0 to 100.
|