Skip to content

Instantly share code, notes, and snippets.

#include <LCDWIKI_GUI.h> //Core graphics library
#include <LCDWIKI_SPI.h> //Hardware-specific library
#include <DHT11.h>
#include <RTClib.h>
RTC_DS1307 rtc;
#define MODEL ILI9488_18
#define CS 8
#define CD 10
#define RST 9
@Ajak58a
Ajak58a / Heart rate sensor (1).ino
Created June 22, 2025 13:56
Heart Rate Sensor
#include <Adafruit_SSD1306.h>
#define OLED_Address 0x3C
Adafruit_SSD1306 oled(128, 64);
int x=0;
int lastx=0;
int lasty=0;
int LastTime=0;
int ThisTime;
bool BPMTiming=false;
@Ajak58a
Ajak58a / sketch_may23d (1).ino
Created June 22, 2025 13:03
How to design a weather station using ESP8266
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <DHT.h>
// Replace with your network credentials
const char* ssid = "YOUR_SSID";
const char* password = "YOUR_PASSWORD";
// Set DHT pin and type
#define DHTPIN 2 // D4 pin on NodeMCU
@Ajak58a
Ajak58a / ESP32-EXT0.ino
Created March 4, 2025 17:08
ESP32-EXT0.ino
#include "driver/rtc_io.h"
#include <Arduino.h>
#define wakeUpPin GPIO_NUM_36
const int ledPin = 23;
RTC_DATA_ATTR int bootCount = 0;
volatile bool wakeUpFlag = false; // Flag to indicate wakeup
void IRAM_ATTR wakeUpISR() {
@Ajak58a
Ajak58a / Code-Snippet-06.ino
Created February 13, 2025 21:37
Text to Speech engine
void loop() {
server.handleClient();
}
@Ajak58a
Ajak58a / Code-Snippet-05
Created February 13, 2025 21:37
Text to Speech engine
void setup() {
// ... (Initialization code) ...
}
@Ajak58a
Ajak58a / Code-Snippet-04.ino
Created February 13, 2025 21:35
Text to Speech engine
void speakOutNumber(long n) {
// ... (Logic to handle numbers from negative to thousands) ...
}
@Ajak58a
Ajak58a / Code-Snippet-03
Created February 13, 2025 21:33
Text to Speech engine
void textToSpeech() {
if (server.arg("Number")!= "") {
Serial.println("Recieved Number: " + server.arg("Number"));
String serverData = String(server.arg("Number"));
int finalNumber = serverData.toInt();
speakOutNumber(finalNumber);
delay(2000); // Short delay, might not be necessary
}
}
@Ajak58a
Ajak58a / gist:49603265e807a32e6e5bc0fc3ec4c227
Created February 13, 2025 21:31
Text to Speech Engine code snippet 2
void handleRoot() {
// ... (HTML code for the web page) ...
server.send ( 200, "text/html", htmlResponse );
}
@Ajak58a
Ajak58a / Code-Snippet-01.ino
Created February 13, 2025 21:29
Text to Speech engine code snippet 1
#include <Arduino.h>
#include <WiFi.h>
#include <WiFiClient.h>
#include <WebServer.h>
#include <ESPmDNS.h> // Not actually used in this code
#include <Talkie.h>
Talkie voice; // Creates an instance of the Talkie speech synthesizer
const char* ssid = "NUA"; // Your WiFi network name