Skip to content

Instantly share code, notes, and snippets.

View LaudixGit's full-sized avatar

LaudixGit

  • North Silicon Valley
View GitHub Profile
@LaudixGit
LaudixGit / MultithreadedPointerHandling.ino
Last active April 7, 2024 22:35
RTOS passing and using pointers to library entities
// simple example demonstrating using a pointer to a class
// and that pointer is passed, as a paramater, to a task
// using a class pointer from another library
// on an iPhone, using "BLE Hero" to observe results
#include <Arduino.h>
#include <BLEDevice.h>
#include <BLEServer.h>
void taskActivity( void *pvParameters );
void bleSetup(void);
@LaudixGit
LaudixGit / ESP32TinyS3-DROK_menu.ino
Last active April 23, 2023 19:34
Use a menu to communicate with the Drok power supply unit
/*
* Use a menu to communicate with the Drok power supplyu unit
*/
//https://esp32s3.com/tinys3.html
//https://broadwellconsultinginc.github.io/SerialWombatArdLib/
//https://www.amazon.com/dp/B08LPVWX74
//https://github.com/bengineer19/BuckPSU
//https://www.droking.com/dc-power-supply/dc-buck/Power-Supply-Module-DC10V-75V-to-0-60V-12A-720W-Buck-Converter-Voltage-regulator-CNC-Control-Module-DC-12V-24V-36V-48V-Adapter
@LaudixGit
LaudixGit / HLFR_FastLED_Tutorial
Created March 11, 2023 00:32
demonstrates how to write to the M5 screen and to the LEDS.
/*
This sample demonstrates how to write to the M5 screen and to the LEDS.
When it starts (setup), info is written to the M5 LCD screen
and all the LEDS are set to a base color, dark gray.
The (loop), every 5th LED is set to a new color
https://www.instructables.com/Neopixel-Ws2812-Rainbow-LED-Glow-With-M5stick-C-Ru/
enable SPI bus for best performance https://github.com/FastLED/FastLED/pull/1047
@LaudixGit
LaudixGit / HLFR.ino
Created December 6, 2022 18:13
Use an M5Stick to control LED light colors
/*
* set the color of the LED strand by
* clicking the button to choose RGB
* and rotating device
*
* https://www.amazon.com/gp/product/B08VGST8LJ
* https://www.amazon.com/gp/product/B06XD72LYM
*
* MIT License Laudix 2022
*/
@LaudixGit
LaudixGit / ESP32ETH01-Server_Base.ino
Last active January 10, 2023 06:28
Common management and communication functions for WT32-ETH01. Used as the starting code of many IoT projects.
/****************************************************************************************************************************
The sketch is a foundation to build upon.
It includes common management and communication functions.
To use, connect a WT32-ETH01 to a network cable, power on, and upload this sketch (no additional circuits needed)
Prerequisites. install the following into Arduino IDE:
- AsyncTCP: https://github.com/me-no-dev/AsyncTCP
- AsyncMqtt_Generic: https://github.com/khoih-prog/AsyncMQTT_Generic
- AsyncWebServer_WT32_ETH01: https://github.com/khoih-prog/AsyncWebServer_WT32_ETH01
#!/usr/bin/python3
#
# receive the MQTT traffic from the broker
# send to dolab Azure IoT Hub
#
# https://raw.githubusercontent.com/eclipse/paho.mqtt.python/master/examples/subscribe_callback.py
# https://www.eclipse.org/paho/clients/python/
# http://www.steves-internet-guide.com/understanding-mqtt-topics/
#
# sudo apt install mosquitto-clients
@LaudixGit
LaudixGit / ESP32ETH01_-_SPIFFS_Certificate.ino
Created January 30, 2022 07:47
ESP32-ETH01 storing a self-signed certificate
/**
* Example for the ESP32 HTTP(S) Webserver
*
* IMPORTANT NOTE:
* To run this script, you need to
* 1) Enter your WiFi SSID and PSK below this comment
*
* This script will install an HTTPS Server on your ESP32 with the following
* functionalities:
* - Show simple page on web server root
@LaudixGit
LaudixGit / ESP8266_MQTT_SSL.ino
Created January 22, 2021 20:32
Connect to Mosquitto SSL with an ESP8266
/*
hardware: https://www.amazon.com/gp/product/B081PX9YFV
Has just barely enough SSL to connect to the MQTT Broker
(no real security)
To see the result (I ran this on RPi0 with client installed: sudo pip3 install paho-mqtt):
mosquitto_sub -v -h mqtt.yourhost.com -t ESP8266Test -p 8883 --capath /etc/ssl/certs/
the MQTT Broker Config (Hosted on an RPI3b+ http://www.steves-internet-guide.com/into-mqtt-python-client/):
persistence false