Skip to content

Instantly share code, notes, and snippets.

@Tech500
Tech500 / OnRecv_Function_Troubleshoot.ino
Last active May 18, 2025 04:00
Master not displaying node ID4
//Submited OnRecv function to ChatGPT for this troubleshooting code:
/*
If node ID4 is not displaying any data, we can troubleshoot this methodically and ensure all active nodes (ID1 to ID4) are properly recognized.
1. Enhanced Debugging Setup:
We'll maintain a list of active node IDs and log any new node detected.
This will help us determine if node ID4 is even sending data or if it's being ignored.
@Tech500
Tech500 / Master.ino
Last active May 15, 2025 13:58
ESP-Now: One master, three nodes --two-way comm --on demand data collection
// ESP-NOW Two-Way Communication - Master (One) and Nodes (Three)
//Example code by ChatGPT --may have errors
// Master Code (ESP32)
#include <WiFi.h>
#include <esp_now.h>
// Define MAC addresses of the three nodes
uint8_t node1Address[] = {0x24, 0x6F, 0x28, 0x12, 0x34, 0x56};
uint8_t node2Address[] = {0x24, 0x6F, 0x28, 0x65, 0x43, 0x21};
uint8_t node3Address[] = {0x24, 0x6F, 0x28, 0x78, 0x90, 0x12};
@Tech500
Tech500 / Blower_Sound_Detection_ChatGPT.ino
Created April 29, 2025 03:04
Sound detection of Furnace blower using esp32 s3 and a MAX9814 microphone breakout.
//Colaboration with ChatGPT and William Lucid 04/28/2025 @ 23:04 EDT
#include <Arduino.h>
const int micPin = 12;
const int sampleWindowMs = 50; // Sampling window size in milliseconds
const int thresholdOn = 1100; // Blower ON if PeakToPeak >= 1100
const int thresholdOff = 900; // Blower OFF if PeakToPeak <= 900
@Tech500
Tech500 / ESP32 hardware one minute timer
Last active April 14, 2025 01:16
>ESP32 one minute timer for project
text by ChatGPT
Perfect! You can absolutely just set a flag inside the interrupt to trigger your `onMinute()` function in `loop()`. That keeps the ISR super lightweight (as it should be), and lets your main code handle the actual processing.
---
### 🔧 Updated Example with `elapsed_onMinute` flag:
```cpp
hw_timer_t *timer = NULL;
### 📌 How to Use Perpetual Google Apps Script to Log Data into a Monthly Google Sheet --post created by ChatGPT
This script automatically logs data into a Google Sheet, creating a new sheet each month and appending rows with each web request. It’s perfect for projects like temperature monitoring or time tracking using ESP32, Arduino, or any device that can send HTTP GET requests.
---
### ✅ What This Script Does
- Receives HTTP GET requests (via doGet)
- Appends data to a Google Sheet
@Tech500
Tech500 / HTTPCllient Function for sending data.txt
Last active April 13, 2025 11:56
HTTPClient Function for sending String "data" to Perpetual, Google Sheet.
String GOOGLE_DEPLOYMENT_ID = " Your Google_Deployment_ID "
void setup(){
//Your setup code
}
void loop(){
//Your loop code
}
@Tech500
Tech500 / Helpdesk.iss
Last active March 7, 2025 16:55
INNO Setup Compiler Script to install Rustdesk and configure network settings for remote support application
// HelpDesk.iss
// 02/26/2025 @ 13:23 EST
// Developed by William Lucid, Github.com\tech500
// Collaboration with Microsoft's Copilot, Google's Gemini, and Open AI's ChatGPT
// Retired, Computer Specialist
#define MyFilePath "C:\RustdeskResources"
#define MyFileName "rustdesk-1.3.8-x86_64.exe"
#define ImportFilename "C:\RustdeskResources\Rustdesk2.toml"
#define MyAppPublisher "Tech500"
@Tech500
Tech500 / BME280 Logging Script.gs
Last active January 13, 2025 14:21
Perpetual data logging to Google Sheets
const sheet_id = "1hBT_nM_UehFrAa7o_lUW-eZEOpnFSgUZqsDaygV7XgQ";
const headers = ['dtstamp', 'temp', 'heatindex', 'humidity', 'dewpoint', 'pressure', 'diff'];
const now = new Date();
const sheetName = `${getMonthNames(now.getMonth())} ${now.getFullYear()}`;
const ss = SpreadsheetApp.openById(sheet_id);
let sheet = ss.getSheetByName(sheetName);
function doGet(e) {
@Tech500
Tech500 / Rustdesk Client Config.bat
Created January 5, 2025 22:33
Remote Control client configuration
REM Document --rustdesk client config batch file
@echo off
REM Assign the value random password to the password variable
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
set alfanum=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
set rustdesk_pw=
for /L %%b in (1, 1, 12) do (
set /A rnd_num=!RANDOM! %% 62
REM Document --rustdesk client config batch file
@echo off
REM Assign the value random password to the password variable
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
set alfanum=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
set rustdesk_pw=
for /L %%b in (1, 1, 12) do (
set /A rnd_num=!RANDOM! %% 62