Ks0111 keyestudio EASY plug Collision Sensor: Difference between revisions
Keyestudio (talk | contribs) No edit summary |
Keyestudio (talk | contribs) |
||
Line 56: | Line 56: | ||
<br> | <br> | ||
==Resources == | ==Resources == | ||
'''PDF'''<br> | '''Download the PDF:'''<br> | ||
https://drive.google.com/open?id=1z2R4aw7hkG3j4QieizAMB7aTZiNrDL1x | https://drive.google.com/open?id=1z2R4aw7hkG3j4QieizAMB7aTZiNrDL1x | ||
<br> | <br> | ||
==Buy from == | ==Buy from == | ||
'''Official Website'''<br> | '''Official Website'''<br> |
Revision as of 08:43, 21 November 2018
Introduction
Crash sensor, also known as snap-action switch, is an electric switch that is actuated by very little physical force.
It is a digital on-off input module necessary for elementary electronic.
By programming, it can be used for the light, sound device, key function of LCD display, 3D Printer position feedback, or other devices.
Note: this sensor needs to be used together with EASY plug control board.
Specification
- Connector: Easy plug
- Onboard status indicator LED
- M3 mounting hole, convenient for fixation on other devices.
- If collision happened, outputs LOW level signal; no collision, outputs HIGH level signal.
Technical Details
- Dimensions: 44mm*20mm*18mm
- Weight: 5.5g
Connect It Up
Connect the EASY Plug crash sensor to control board using an RJ11 cable. Then connect the control board to your PC with a USB cable.
Upload the Code
Copy and paste below code to Arduino IDE and upload.
int Led=13;// set pin for LED int Shock=9// set pin for collision sensor ;int val;// set digital variable val void setup() { pinMode(Led,OUTPUT);// set pin LED as output pinMode(Shock,INPUT);// set collision sensor as input } void loop() { val=digitalRead(Shock);// read value on pin 9 and assign it to val if(val==HIGH)// when collision sensor detects a signal, turn LED on. { digitalWrite(Led,LOW); } else { digitalWrite(Led,HIGH); } }
What You Should See
When an object crashes the metal switch of the sensor, the indicator LED is turned on. If no crash happened, LED is turned off.
Resources
Download the PDF:
https://drive.google.com/open?id=1z2R4aw7hkG3j4QieizAMB7aTZiNrDL1x
Buy from
Official Website
http://www.keyestudio.com/keyestudio-easy-plug-collision-crash-sensor-module-for-arduino.html