Skip to content

Instantly share code, notes, and snippets.

View suadanwar's full-sized avatar

Suad Anwar suadanwar

View GitHub Profile
@suadanwar
suadanwar / Height.ino
Last active October 11, 2019 00:07
This sample code is for height measurement using ultrasonic sensor and dot matrix on Maker UNO's tutorial.
#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
@suadanwar
suadanwar / SafeBox.ino
Created October 17, 2019 10:35
This sample code is for Safe Box's Tutorial.
#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
@suadanwar
suadanwar / bedLamp.ino
Created October 25, 2019 00:48
This sample code is for Colourful Bed Lamp Using Tilt Sensor on Maker UNO tutorial.
const int tiltPin = 2;
const int redLed = 11;
const int greenLed = 10;
const int blueLed = 9;
int tiltState;
int count = 0;
void setup() {
pinMode(redLed, OUTPUT);
@suadanwar
suadanwar / SmartDustbin.ino
Created December 6, 2019 04:52
This sample code is for Smart Dustbin Tutorial.
#include <Servo.h> // Include the Servo library
#define SERVO 3
#define TRIGPIN 12
#define ECHOPIN 11
#define PIEZO 8
Servo myServo; // Create a servo object
int val = 0;
long duration;
long distance;
@suadanwar
suadanwar / roboticArm.ino
Created January 10, 2020 00:45
This sample code is for a simple robotic arm tutorial.
#include <Servo.h>
Servo Servo_X;
Servo Servo_Y;
Servo Servo_Grip;
#define Joy_X A0
#define Joy_Y A1
#define BUTTON 2
@suadanwar
suadanwar / wirebuzz.ino
Created January 17, 2020 04:11
This sample code is for Wire Buzz tutorial.
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 20, 2); // set the LCD address to 0x27 for a 16 chars and 2 line display
#define PIEZO 8
#define WIRE 9
#define FINISH 10
#define NOTE_C5 523
#define NOTE_D5 587
#define NOTE_E5 659
@suadanwar
suadanwar / smart_blind_stick.ino
Created January 23, 2020 06:18
This sample code is for Smart Blind Stick Tutorial.
#define TRIGPIN1 2
#define ECHOPIN1 3
#define TRIGPIN2 5
#define ECHOPIN2 6
#define PIEZO 8
// defines variables
long Duration1;
int Distance1;
long Duration2;
@suadanwar
suadanwar / Solenoid_Relay.ino
Created January 30, 2020 08:57
This sample code is for Solenoid Door Lock with Relay on Arduino.
#define BUTTON 2 // the number of the pushbutton pin
#define RELAY 3 // the number of the relay pin
// variables will change:
int buttonState = 0; // variable for reading the pushbutton status
void setup() {
// initialize the LED pin as an output:
pinMode(RELAY, OUTPUT);
// initialize the pushbutton pin as an input:
@suadanwar
suadanwar / RFID_Solenoid.ino
Last active February 6, 2020 10:33
This sample code is for RFID Solenoid Door Lock with Arduino.
/*
--------------------------------------------------------------------------------------------------------------------
Example sketch/program showing how to read data from a PICC to serial.
--------------------------------------------------------------------------------------------------------------------
Typical pin layout used:
-----------------------------------------------------------------------------------------
MFRC522 Arduino Arduino Arduino Arduino Arduino
Reader/PCD Uno/101 Mega Nano v3 Leonardo/Micro Pro Micro
Signal Pin Pin Pin Pin Pin Pin
-----------------------------------------------------------------------------------------
@suadanwar
suadanwar / Multiple_Servo_Blynk.ino
Last active February 20, 2020 06:59
This sample code is for Control Multiple Servo Using Blynk App's tutorial.
/*************************************************************
Control multiple servo using a Blynk App!
App project setup:
*************************************************************/
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
#include <ESP8266_Lib.h>