This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define SENSOR 2 | |
#define PIEZO 8 | |
#define NOTE_G4 392 | |
#define NOTE_C5 523 | |
#define NOTE_G5 784 | |
#define NOTE_C6 1047 | |
int Sound[] = {NOTE_G5, NOTE_C6}; | |
int SoundNoteDurations[] = {12, 8}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Melody | |
Plays a melody | |
circuit: | |
- 8 ohm speaker on digital pin 8 | |
created 21 Jan 2010 | |
modified 30 Aug 2011 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Include IR Remote Library by Ken Shirriff | |
#include <IRremote.h> | |
// Define sensor pin | |
const int RECV_PIN = 4; | |
// Define LED pin | |
#define RED 8 | |
#define GREEN 9 | |
#define YELLOW 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Servo.h> | |
Servo myservo1; | |
Servo myservo2; | |
int touchSensorPin = 2; | |
int touchSensorState = 0; | |
void setup() { | |
myservo1.attach(9); | |
myservo2.attach(10); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SPI.h> | |
#include <Wire.h> | |
#include <Adafruit_GFX.h> | |
#include <Adafruit_SSD1306.h> | |
#include "DHT.h" | |
#define SCREEN_WIDTH 128 // OLED display width, in pixels | |
#define SCREEN_HEIGHT 64 // OLED display height, in pixels | |
// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Servo.h> // Include the library for the servo | |
#define RAIN_SENSOR A0 | |
#define SERVO1_PIN 10 | |
#define SERVO2_PIN 11 | |
Servo myservo1; // Create servo object to control a servo | |
Servo myservo2; | |
int rainAdc = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define BLYNK_PRINT Serial | |
#include <WiFi.h> | |
#include <WiFiClient.h> | |
#include <BlynkSimpleEsp32.h> | |
// You should get Auth Token in the Blynk App. | |
// Go to the Project Settings (nut icon). | |
char auth[] = "YourAuthToken"; | |
// Your WiFi credentials. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "CytronMotorDriver.h" | |
// Configure the motor driver. | |
CytronMD motor1(PWM_PWM, 3, 9); // PWM 1A = Pin 3, PWM 1B = Pin 9. | |
CytronMD motor2(PWM_PWM, 10, 11); // PWM 2A = Pin 10, PWM 2B = Pin 11. | |
#define BUTTON 2 | |
#define PIEZO 8 | |
#define IR_LEFT A0 | |
#define IR_RIGHT A1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <MD_Parola.h> | |
#include <MD_MAX72xx.h> | |
#include <SPI.h> | |
#define HARDWARE_TYPE MD_MAX72XX::FC16_HW | |
#define MAX_DEVICES 4 | |
#define CLK_PIN 13 | |
#define DATA_PIN 11 | |
#define CS_PIN 10 | |
#define scrollSpeed 70 // scroll speed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <LiquidCrystal_I2C.h> | |
LiquidCrystal_I2C lcd(0x27, 20, 2); | |
#include <Keypad.h> | |
#include <Servo.h> | |
Servo myservo; | |
#define Password_Lenght 7 // Give enough room for six chars + NULL char |