filmov
tv
Pt-7: How To Program the Knock Sensor Module from the 37 in 1 Sensor Kit #arduino #knocksensor

Показать описание
How to program the Knock Sensor Module from the KEYESTUDIO 37 in 1 Sensor Kit using the Arduino UNO, Arduino IDE. The diagram was made using Fritzing. #arduino #arduinouno #37in1sensorskit #keyestudio #knocksensor #vibrationsensor #vibration
Here's the Arduino code:
FYI, for future reference, YT doesn't like angle brackets (aka 'less than' or 'greater than' symbols). If you see code with 'lt/lte' and 'gt/gte' below then substitute with the 'less than/less than equal to' and 'greater than/ greater than equal to' symbols.
***************************************
int knockSensorModule = 8;
bool readingKnockSensor = 0;
int rgbLEDModule = 12;
void setup() {
pinMode(knockSensorModule, INPUT);
pinMode(rgbLEDModule, OUTPUT);
}
void loop() {
readingKnockSensor = digitalRead(knockSensorModule);
if (readingKnockSensor == LOW) {
for (int x=0; x 'lt' 3; x++){
digitalWrite(rgbLEDModule, HIGH);
delay(1000);
digitalWrite(rgbLEDModule, LOW);
delay(1000);
}
}
else {
digitalWrite(rgbLEDModule, LOW);
}
delay(10);
}
***************************************
Here's the Arduino code:
FYI, for future reference, YT doesn't like angle brackets (aka 'less than' or 'greater than' symbols). If you see code with 'lt/lte' and 'gt/gte' below then substitute with the 'less than/less than equal to' and 'greater than/ greater than equal to' symbols.
***************************************
int knockSensorModule = 8;
bool readingKnockSensor = 0;
int rgbLEDModule = 12;
void setup() {
pinMode(knockSensorModule, INPUT);
pinMode(rgbLEDModule, OUTPUT);
}
void loop() {
readingKnockSensor = digitalRead(knockSensorModule);
if (readingKnockSensor == LOW) {
for (int x=0; x 'lt' 3; x++){
digitalWrite(rgbLEDModule, HIGH);
delay(1000);
digitalWrite(rgbLEDModule, LOW);
delay(1000);
}
}
else {
digitalWrite(rgbLEDModule, LOW);
}
delay(10);
}
***************************************
Python How To Program Pt 7
how to speedrun level 7 (code part)
How to program the PIC18F4550 microcontroller (blink demo board) part 7 of 8
Movement As Medicine Pt. 7/7 5 Essential Program Design Factors
Mathapelo On Gender In Christ, Female Preachers, Podcast, ZCC. PART 7
Part 7 | Code will require these in all areas
Indian Bikes Driving 3d All New Cheat Code 🤑 Part-7 #shorts
NEW CODE/ID IN BROOKHAVEN🤯😳 [PT.7] #roblox #brookhaven #update #3d #robloxedit
(Part-7) Build your muscle | Powerful website you should know|CODE & SOUL | #bodybuilding #muscl...
Learn to code in Delphi | Part 7 | Input Process Output
Lung inflation in Science Lesson #science #teacher #biology
World’s Largest Cup Tower
ZYNOX FF HEADSHOT MAP NEW PASSWORD | ZYNOX FF Map code | PART 7
C# Tutorial Video (part 7) - How to Program in C# - If Statements and Booleans
The Best Workout Split for Intermediate Lifters
Math Intervention Program - Number Theory Past Paper Pt. 7
Underwater Part 7 Unlocking the Day-Ticket Code
How to Contribute to C# in VS Code [Pt 7] | C# and .NET Development in VS Code for Beginners
Part 7 of the Throwers Ten Exercise program
SO Many Code Violations! - Part 7
Creating a Hypertrophy Training Program | Part 7: Progressive Overload
How To Win Chess in 2 Moves #Shorts
XYANSH 2V2 HACK MAP CODE | XYANSH MAP PASSWORD | PT 7
🔧 03 STEPS TO OPTIMIZE WINDOWS FOR GAMING & PERFORMANCE🔥| Part 01/03 ✔️
Комментарии