SEN0209

SampleCode
/***************************************************
* Piezo Vibration Sensor
* ****************************************************
* This example The sensors detect vibration
* @author linfeng(490289303@qq.com)
* @version V1.0
* @date 2016-2-26
* GNU Lesser General Public License.
* See <http://www.gnu.org/licenses/> for details.
* All above must be included in any redistribution
* ****************************************************/
#define sensorPin A1
#define ledPin 13
void setup() {
Serial.begin(115200);
pinMode(ledPin,OUTPUT);
}
void loop() {
int x=analogRead(sensorPin);
Serial.println(x);
if(x>500)digitalWrite(13,HIGH);
else digitalWrite(13,LOW);
delay(50);
}
ExpectedResults
For any questions, advice or cool ideas to share, please visit the DFRobot Forum.
https://www.dfrobot.com/wiki/index.php/Gravity:_Flexible_Piezo_Film_Vibration_Sensor_SKU:_SEN0209SEN0152 6-7-17

SEN0209

Mfr. #:
Manufacturer:
DFRobot
Description:
Multiple Function Sensor Development Tools GravityFlexiblePiezo Film Vibration SNSR
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet