Ks0111 keyestudio EASY plug Collision Sensor: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
No edit summary
Line 52: Line 52:


==Buy from ==
==Buy from ==
'''Official Website'''


http://www.keyestudio.com/keyestudio-easy-plug-collision-crash-sensor-module-for-arduino.html
http://www.keyestudio.com/keyestudio-easy-plug-collision-crash-sensor-module-for-arduino.html


[[category:Module]]
[[category:Module]]

Revision as of 11:45, 15 November 2017

EASY plug Collision Sensor


thumb

Introduction

Collision sensor, also known as electronic switch, is a digital on-off input module necessary for elementary electronic learning. By programming, it can realize control over light, sound device, key choice function of LCD display etc. Using 3P sensor cable to connect it to sensor shield, it can be installed to 4WD AL alloy mobile robot platform to realize collision detection function. It is both convenient and effecient.
Note:
You can make a collision flasher using collision module and built-in LED on interface 13. Connect the collision senser to pin 3, when the collision sensor senses a collision signal, the LEDs on mainboard and module will light up simultaneously.
Note: this module needs to be used together with EASY plug control board.


Specification

  • Interface: Easy plug
  • If collision happens upfront of where collision module is installed, module outputs low level signal; no collision, outputs high level signal.
  • Module reserves M3 mounting hole, convenient for fixation on a car.
  • With switch indicator light, if there is collision, light is on; no collision, light is out.
  • Size: 39 * 20mm
  • Weight: 7g


Connection Diagram


thumb


Sample Code

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, LED turns on.
{
digitalWrite(Led,LOW);
} else
{
digitalWrite(Led,HIGH);
}
}

Resources

Datasheet

http://www.keyestudio.com/files/index/download/id/1464060819/

Buy from

Official Website

http://www.keyestudio.com/keyestudio-easy-plug-collision-crash-sensor-module-for-arduino.html