Skip to content

Instantly share code, notes, and snippets.

View AbhishekGhosh's full-sized avatar
🔒
Happy

Abhishek Ghosh AbhishekGhosh

🔒
Happy
View GitHub Profile
@AbhishekGhosh
AbhishekGhosh / water_level.ino
Created March 25, 2024 18:56
water_level.ino
#include <Wire.h>
#include <VL53L0X.h>
#include <WiFi.h>
#include <HTTPClient.h>
const char* ssid = "YourWiFiSSID";
const char* password = "YourWiFiPassword";
const char* serverAddress = "http://yourserver.com/store_data.php";
VL53L0X sensor;
@AbhishekGhosh
AbhishekGhosh / index.html
Created March 25, 2024 18:55
index.html
<!DOCTYPE html>
<html>
<head>
<title>Water Tank Level Monitoring</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
// Function to fetch water level data
function fetchWaterLevel() {
$.ajax({
@AbhishekGhosh
AbhishekGhosh / get_data.php
Created March 25, 2024 18:54
get_data.php
<?php
$servername = "localhost";
$username = "your_username";
$password = "your_password";
$dbname = "your_database";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
@AbhishekGhosh
AbhishekGhosh / store_data.php
Created March 25, 2024 18:53
store_data.php
<?php
$servername = "localhost";
$username = "your_username";
$password = "your_password";
$dbname = "your_database";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
@AbhishekGhosh
AbhishekGhosh / ESP32-Web-Controlled-Servo.ino
Created July 1, 2023 09:31 — forked from elktros/ESP32-Web-Controlled-Servo.ino
Code for ESP32 Web Controlled Servo.
#include <WiFi.h>
const int servoPin = 16; /* GPIO16 */
const char* ssid = "ESP32-WiFi"; /* Add your router's SSID */
const char* password = "12345678"; /*Add the password */
int dutyCycle = 0;
//int position1 = 0;
http://rpc.pingomatic.com/
http://rpc.weblogs.com/RPC2
http://rpc.blogbuzzmachine.com/RPC2
http://rpc.aitellu.com
http://rpc.bloggerei.de/ping/
http://rpc.reader.livedoor.com/ping
http://rpc.twingly.com/
http://ping.feedburner.com
http://ping.bloggers.jp/rpc/
http://ping.myblog.jp
@AbhishekGhosh
AbhishekGhosh / chaser.ino
Created June 23, 2023 09:38
Simple LED chaser Arduino
int LED13 = 13;
int LED12 = 12;
int LED11 = 11;
int LED10 = 10;
int LED9 = 9;
int LED8 = 8;
int LED7 = 7;
int LED6 = 6;
int LED5 = 5;
int LED4 = 4;
@AbhishekGhosh
AbhishekGhosh / insert_data.php
Created June 4, 2023 17:24
Insert data in MySQL tables
<?php
$servername = "localhost";
$username = "non-root";
$password = "non-root-password";
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error){
die("Connection failed: " . $conn->connect_error);
}
$sql = "INSERT INTO LED_status (id, status)
@AbhishekGhosh
AbhishekGhosh / create-table.php
Created June 4, 2023 17:16
Create MySQL Table With PHP
<?php
$servername = "localhost";
$username = "non-root";
$password = "non-root-password";
$dbname = "ESP32IoT";
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
@AbhishekGhosh
AbhishekGhosh / create-database.php
Last active June 4, 2023 16:43
Create MySQL Database With PHP
<?php
$servername = "localhost";
$username = "non-root";
$password = "non-root-password";
$conn = new mysqli($servername, $username, $password);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}