Skip to content

Instantly share code, notes, and snippets.

@Ajak58a
Ajak58a / OTP-Door-Lock.ino
Created May 23, 2024 16:33
OTP Door Lock
#include <Keypad.h>
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
#define OLED_MOSI 9
#define OLED_CLK 10
#define ir_sensor_1 14
#define ir_sensor_2 15
#define ir_sensor_3 16
#define ir_sensor_4 17
#define ir_sensor_5 18
#define ir_sensor_6 19
#define led1 2
#define led2 3
#define led3 4
#define led4 5
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <WiFi.h>
#include <time.h>
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
@Ajak58a
Ajak58a / App-Controlled-Watering-System.ino
Created April 23, 2024 02:05
App controlled watering system
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <WiFiClient.h>
//#include <ArduinoJson.h>
#include <WiFiUdp.h>
WiFiUDP udp;
const int Port = 5000;
char Packet[80];
@Ajak58a
Ajak58a / IOT-Digital-Watch.ino
Created April 21, 2024 18:48
IoT Digital Watch
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <WiFi.h>
#include <HTTPClient.h>
#include <ArduinoJson.h>
#define SCREEN_WIDTH 128
@Ajak58a
Ajak58a / omni_directional_PnP_robot.ino
Created April 21, 2024 18:41
Robot control program
#include <SoftwareSerial.h>
#include <Servo.h>
#define motor_A_1 2
#define motor_A_2 4
#define motor_B_1 7
#define motor_B_2 8
#define motor_C_1 12
#define motor_C_2 13
#define HC12_Tx_pin 19
#define HC12_Rx_pin 18
@Ajak58a
Ajak58a / Tx_Joystick_Btn.ino
Created April 21, 2024 18:38
Remote control program
#include <SoftwareSerial.h>
#define led 13
#define btn1 0
#define btn2 1
#define btn3 2
#define btn4 3
#define btn5 4
#define btn6 5
#define btn7 6
#define btn8 7
@Ajak58a
Ajak58a / IoT-Flood-Indicator.ino
Created March 21, 2024 22:49
Flood indicator
#include "ThingSpeak.h"
#include <ESP8266WiFi.h>
const int trig = D1;
const int echo = D2;
#define redLed D3
#define grnLed D4
unsigned long channelID = REPLACE_WITH_YOUR_THINGSPEAK_CHANNEL_ID;
const char * write_api = "REPLACE_WITH_YOUR_THINGSPEAK_WRITE_API_KEY";
void Menu()
{
tft.fillScreen(BLACK);
tft.drawRoundRect(0, 0, 320, 480, 8, WHITE); //Page border
tft.setCursor(140, 5);
tft.setTextSize(2);
tft.setTextColor(CYAN);
tft.print("Menu");
tft.setCursor(5, 30);
@Ajak58a
Ajak58a / Digital-Menu.ino
Created March 12, 2024 12:40
Digital menu 1
#include <Adafruit_GFX.h>
#include <MCUFRIEND_kbv.h>
#include "TouchScreen.h"
#define BLACK 0x0000
#define BLUE 0x001F
#define RED 0xF800
#define GREEN 0x07E0
#define CYAN 0x07FF
#define MAGENTA 0xF81F