Skip to content

Instantly share code, notes, and snippets.

View labsguru's full-sized avatar

LabsGuru Technologies Private Limited labsguru

View GitHub Profile
int buzzer = 8; // set the buzzer control digital IO pin
void setup() {
pinMode(buzzer, OUTPUT); // set pin 8 as output
}
void loop() {
for (int i = 0; i < 80; i++) {
digitalWrite(buzzer, HIGH); // make a sound
delay(1); // send high signal to buzzer
digitalWrite(buzzer, LOW); // delay 1ms
delay(1); // send low signal to buzzer
#include "HX710B.h"
const int DOUT = 2; //sensor data pin
const int SCLK = 3; //sensor clock pin
HX710B pressure_sensor;
void setup() {
Serial.begin(57600);
pressure_sensor.begin(DOUT, SCLK);
}
void setup() {
pinMode(A0, INPUT);
Serial.begin(9600);
} //https://kitsguru.com/products/ky-039-finger-detection-heartbeat-measuring-sensor-module
void loop() {
float pulse;
int sum = 0;
for (int i = 0; i < 20; i++)
sum += analogRead(A0);
/*
AS608-Optical-Fingerprint-Sensor-enroll
Home based on Adafruit Library
//https://kitsguru.com/products/as608-optical-fingerprint-sensor-fingerprint-module
*/
#include <Adafruit_Fingerprint.h>
SoftwareSerial mySerial(2, 3); // TX/RX
Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);
#define SensorPin 0
unsigned long int avgValue;
float b;
int buf[10],temp;
void setup()
{
pinMode(13,OUTPUT);
Serial.begin(9600);
}
/*
Connect the voltage signal wire to Arduino analog interface:
Yellow Cable<---->A0
*/
void setup()
{
Serial.begin(9600);
}
void loop()
{
#define SensorPin A0 // the pH meter Analog output is connected with the Arduino’s Analog
unsigned long int avgValue; //Store the average value of the sensor feedback
float b;
int buf[10],temp;
void setup() //https://kitsguru.com/products/industrial-grade-analog-ph-sensor-kit
{
pinMode(13,OUTPUT);
Serial.begin(9600);
Serial.println("Ready"); //Test the serial monitor
}
/************************************************************
Water pressure sensor demo(Computer serial port)
- Obtain the water pressure through the output voltage
of the sensor.
**************************************************************/
//https://kitsguru.com/products/x-mpa-stainless-steel-pressure-transducer-sensor
/************************************************************
Water Sensor Key Parameter
- Parts No.:KY-3-5
- Sensing range: 0 - 1.6 MPa
int inPin = 2; // Tilt Sensor
int outPin = 13; // LED Pin
//https://kitsguru.com/products/tilt-switch-sensor-module-for-arduino
int LEDstate = HIGH; // the current state of the output pin
int reading; // the current reading from the input pin
int previous = LOW; // the previous reading from the input pin
// the following variables are long because the time, measured in miliseconds,
// will quickly become a bigger number than can be stored in an int.
long time = 0; // the last time the output pin was toggled
const int knockPin = 8; //https://kitsguru.com/products/the-knock-sensor-module
const int ledPin = 7;
int knockVal = HIGH;
boolean knockAlarm = false;
unsigned long prevKnockTime;
int knockAlarmTime = 100;
void setup ()
{
Serial.begin(9600);