Difference between revisions of "Sensor / Trinket Template"
From Microduino Wiki
(→mCookie Series (using mCenter)) |
(→Arduino IDE) |
||
(27 intermediate revisions by the same user not shown) | |||
Line 22: | Line 22: | ||
The bare minimum hardware configurations to used this module is as follows: | The bare minimum hardware configurations to used this module is as follows: | ||
==Microduino Series== | ==Microduino Series== | ||
− | *1x of the following core | + | <tab name="View" style="width: 100%" collapsed> |
− | + | [[File:Microduino_Crash-rect.jpg|thumb|right]] | |
− | + | *1x of the following core modules: Microduino Core, Microduino Core+, Microduino CoreUSB, or Microduino CoreRF | |
− | |||
− | |||
*1x Microduino USBTTL | *1x Microduino USBTTL | ||
*1x Microduino Connector Hub | *1x Microduino Connector Hub | ||
*1x Connector Wire | *1x Connector Wire | ||
− | *1x | + | *'''1x Crash Sensor''' |
+ | </tab> | ||
==mCookie Series== | ==mCookie Series== | ||
− | *1x of the following core | + | <tab name="View" style="width:100%" collapsed> |
+ | [[File:Microduino_Crash-rect.jpg|thumb|right]] | ||
+ | *1x of the following core modules: mCookie Core, mCookie Core+, mCookie CoreUSB, or mCookie CoreRF | ||
*1x of the following core programmers: mCookie USB-TTL, or mCookie mBattery (built-in programmer) | *1x of the following core programmers: mCookie USB-TTL, or mCookie mBattery (built-in programmer) | ||
*1x mCookie Connector Hub | *1x mCookie Connector Hub | ||
*1x Connector Wire | *1x Connector Wire | ||
− | |||
*'''1x Crash Sensor''' | *'''1x Crash Sensor''' | ||
+ | </tab> | ||
==mCookie Series (using mCenter+)== | ==mCookie Series (using mCenter+)== | ||
+ | <tab name="View" style="width:100%" collapsed> | ||
+ | [[File:Microduino_Crash-rect.jpg|thumb|right]] | ||
*1x mCenter+ (built-in mCookie Core+ & programmer) | *1x mCenter+ (built-in mCookie Core+ & programmer) | ||
*1x Connector Wire | *1x Connector Wire | ||
− | |||
*'''1x Crash Sensor''' | *'''1x Crash Sensor''' | ||
+ | </tab> | ||
+ | |||
+ | =Usage= | ||
+ | ==Arduino IDE== | ||
+ | ===Digital Read=== | ||
+ | <syntaxhighlight lang="cpp"> | ||
+ | digitalRead(pinNum) | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | {| | ||
+ | |'''Description:''' | ||
+ | |Reads the current value of the Crash Sensor. | ||
+ | |- | ||
+ | |'''Arguments:''' | ||
+ | |pinNum - the pin number that the Crash Sensor is connected to. | ||
+ | |- | ||
+ | |'''Return:''' | ||
+ | |'''true''' or '''high''' when the Crash Sensor is NOT pressed. | ||
+ | |- | ||
+ | | | ||
+ | |'''false''' or '''low''' when the Crash Sensor is pressed. | ||
+ | |} |
Latest revision as of 20:37, 22 February 2019
Contents
Introduction
The Microduino Crash Sensor is module which can detect if it is pressed or not. It acts a button or switch.
Technical Specifications
- SKU / module number: MSDS11
- Operating voltage: 5V
- Connectors: n/a
- Chip Used: n/a
- Schematics: File:Na
- Dimensions:
Compatible Pins
Use a connector wire to connect this module to either a Microduino Hub module, mCookie Hub module, mCenter+, or any other boards which accepts the standard 4-pin connector for a sensor / trinket.
This module requires a digital input compatible pin as shown below:
Hardware Setup
The bare minimum hardware configurations to used this module is as follows:
Microduino Series
mCookie Series
mCookie Series (using mCenter+)
Usage
Arduino IDE
Digital Read
digitalRead(pinNum)
Description: | Reads the current value of the Crash Sensor. |
Arguments: | pinNum - the pin number that the Crash Sensor is connected to. |
Return: | true or high when the Crash Sensor is NOT pressed. |
false or low when the Crash Sensor is pressed. |