Skip to content

Instantly share code, notes, and snippets.

@Ajak58a
Ajak58a / joystick_HC12_tx_ATtiny.ino
Created June 19, 2024 16:09
Joystick controlled dc motor
#include <SoftwareSerial.h>
#define led 0
SoftwareSerial HC12(1,2);
void blink_led()
{
digitalWrite(led,HIGH);
delay(250);
digitalWrite(led,LOW);
}
void setup()
@Ajak58a
Ajak58a / MP3-TF-16P-Arduino.ino
Created June 10, 2024 20:38
MP3 Audio Files
void sendDFCommand(byte Command, int ParData) {
byte commandData[10];
byte q;
int checkSum;
commandData[0] = 0x7E; //Start of new command
commandData[1] = 0xFF; //Version information
commandData[2] = 0x06; //Data length (not including parity) or the start and version
commandData[3] = Command; //The command that was sent through
commandData[4] = 0x01; //1 = feedback
commandData[5] = highByte(ParData); //High byte of the data sent over
@Ajak58a
Ajak58a / HX711 digital scale.ino
Created June 3, 2024 16:42
Digital Weighing Scale
#include "HX711.h"
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <Pushbutton.h>
const int HX711_DOUT = 2;
const int HX711_SCK = 3;
HX711 scale;
@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