Skip to content

Instantly share code, notes, and snippets.

#define duration 5000
#define A 2
#define B 3
#define C 4
#define D 5
#define E 6
#define F 7
#define G 8
#define DP 9
#include <LiquidCrystal.h>
LiquidCrystal lcd(7,6,5,4,3,2);
const int set = 8;
int hours=10;
int start=11;
int relay=9;
int b=0,h=0,t=0;
int buttonState = 0;
int lastButtonState = 0;
#include <Servo.h>
//defining Servos
Servo servohori;
int servoh = 0;
int servohLimitHigh = 160;
int servohLimitLow = 20;
Servo servoverti;
int servov = 0;
int servovLimitHigh = 160;
#include <LiquidCrystal.h>
#include <RotaryEncoder.h>
LiquidCrystal lcd( 8 , 9 , 4 , 5 , 6 , 7);
RotaryEncoder encoder(10, 11);
int sensorPin = A0; // select the input pin for the potentiometer
//int ledPin = 13; // select the pin for the LED
int sensorValue = 0; // variable to store the value coming from the sensor
void setup() {
// declare the ledPin as an OUTPUT:
Serial.begin(9600);
pinMode(ledPin, OUTPUT);
pinMode(11,OUTPUT);
}
#include <Wire.h>
#include<EEPROM.h>
#include <RTClib.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd(2, 3, 4, 5, 6, 7);
RTC_DS1307 RTC;
int tmp,Inc,hor,mIn,add=11;
int set=8;
int cge=9;
int mod=10;
#include <LedControl.h>
int DIN = 13;
int CS = 12;
int CLK = 11;
byte E[8] = {0x3C,0x20,0x20,0x3C,0x20,0x20,0x20,0x3C};
byte L[8] = {0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3E};
byte C[8] = {0x1C,0x20,0x20,0x20,0x20,0x20,0x20,0x1C};
#define SENSOR_PIN 3
#define LED_PIN 13
void setup()
{
pinMode(SENSOR_PIN, INPUT_PULLUP);
pinMode(LED_PIN, OUTPUT);
int LED1=12;
int GND1=13;
int LED2=8;
int GND2=9;
int pirOutput=5;
void setup()
{
Serial.begin(9600);
pinMode(LED1,OUTPUT);
pinMode(GND1,OUTPUT);
#include<LiquidCrystal.h>
LiquidCrystal lcd(7,6,5,4,3,2);
const int Sensor = A0;
byte degree_symbol[8] =
{
0b00111,
0b00101,
0b00111,
0b00000,