Skip to content

Instantly share code, notes, and snippets.

@Ajak58a
Ajak58a / code.ino
Created March 2, 2024 23:04
DIY Circuit Home Security System: Dog-Inspired Motion Detection System
#include <TMRpcm.h> // Library for audio play from SDcard
#include <pcmConfig.h>
#include <pcmRF.h>
#include <SD.h>
#include <SPI.h>
#define SD_ChipSelectPin 10 //using digital pin 10 on arduino uno
TMRpcm tmrpcm;
void setup() {
tmrpcm.speakerPin=9; //PWM pin 9 on Uno
Serial.begin(9600); //Begin Arduino serial monitor
@Ajak58a
Ajak58a / Paint.ino
Created February 22, 2024 02:47
How to build a paint application using Arduino
#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
#include "esp_camera.h"
#include <WiFi.h>
#include "soc/soc.h"
#include "soc/rtc_cntl_reg.h"
//
// WARNING!!! PSRAM IC required for UXGA resolution and high JPEG quality
// Ensure ESP32 Wrover Module or other board with PSRAM is selected
// Partial images will be transmitted if image exceeds buffer size
@Ajak58a
Ajak58a / object_follower.ino
Created February 14, 2024 23:22
Object following robot
#include <Servo.h>
#define udm_trig 7
#define udm_echo 6
#define RightMotorPin1 2
#define RightMotorPin2 3
#define LeftMotorPin1 4
#define LeftMotorPin2 5
#define soundpin 12
Servo sensor_servo;
#include "DHT.h"
#include <ESP8266WiFi.h>
#define DHTPIN 5 // esp8266 D2 pin map as 4 in Arduino IDE
#define DHTTYPE DHT11 // there are multiple kinds of DHT sensors
DHT dht(DHTPIN, DHTTYPE);
const char* ssid = "REPLACE_WITH_YOUR_SSID";
const char* password = "REPLACE_WITH_YOUR_NETWORK_PASSWORD";
WiFiServer server(80);
@Ajak58a
Ajak58a / TCS230-TCS3200-Color-Detection.ino
Created January 11, 2024 02:57
TCS230/TCS3200 color-recognition sensor with Arduino
// TCS230 or TCS3200 pins wiring to Arduino
#define S0 13
#define S1 12
#define S2 11
#define S3 10
#define sensorOut 9
// Stores frequency read by the photodiodes
int R = 0;
int G = 0;
@Ajak58a
Ajak58a / fire-detection-whatsapp-SMS.ino
Created January 10, 2024 01:35
Fire detection alarm
#include "SoftwareSerial.h"
#include "DFRobotDFPlayerMini.h"
// Use pins 2 and 3 to communicate with DFPlayer Mini
static const uint8_t PIN_MP3_TX = 26; // Connects to module's RX
static const uint8_t PIN_MP3_RX = 27; // Connects to module's TX
SoftwareSerial softwareSerial(PIN_MP3_RX, PIN_MP3_TX);
// Create the Player object
DFRobotDFPlayerMini player;
@Ajak58a
Ajak58a / Sign-to-Speech.ino
Created January 5, 2024 19:19
Sign Language To Speech Converter
#include "SoftwareSerial.h"
#include "DFRobotDFPlayerMini.h"
// Use pins 2 and 3 to communicate with DFPlayer Mini
static const uint8_t PIN_MP3_TX = 26; // Connects to module's RX
static const uint8_t PIN_MP3_RX = 27; // Connects to module's TX
SoftwareSerial softwareSerial(PIN_MP3_RX, PIN_MP3_TX);
// Create the Player object
DFRobotDFPlayerMini player;
@Ajak58a
Ajak58a / portable-health-monitor.ino
Created December 5, 2023 18:14
Portable Health monitor
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <MAX30100_PulseOximeter.h>
#include <Adafruit_MLX90614.h>
#define ECG_PIN A0
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
#include <BluetoothSerial.h>
#include <WiFi.h>
#include <NTPClient.h>
#include <WiFiUdp.h>
#define NOTE_B0 31
#define NOTE_C1 33
#define NOTE_CS1 35
#define NOTE_D1 37
#define NOTE_DS1 39