Skip to content

Instantly share code, notes, and snippets.

View toxicantidote's full-sized avatar

toxicantidote

View GitHub Profile
@toxicantidote
toxicantidote / wifi_select.ino
Last active May 22, 2023 01:08
ESP32 Wi-Fi search and connect to saved
#include <WiFi.h>
#include <Preferences.h>
#include <esp_task_wdt.h>
#define CMDPROMPT "ESP32> "
#define TIMEOUT 10000
// cmd line vars
char cmdBuffer[32];
int cmdBufferPosition = 0;
@toxicantidote
toxicantidote / Nayax sales reporting.py
Created June 28, 2022 08:18
Nayax sales reporting
## standard libraries
import re
import time
import queue
import threading
import json
from tkinter import *
from tkinter import ttk, font, messagebox, filedialog
import datetime
import os
@toxicantidote
toxicantidote / esp32_st7735s.py
Created July 13, 2023 23:38
ST7735S display test - CircuitPython (ESP32)
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
"""
This test will initialize the display using displayio and draw a solid green
background, a smaller purple rectangle, and some yellow text.
"""
import board
import terminalio
@toxicantidote
toxicantidote / picow_st7735s.py
Created July 13, 2023 23:53
ST7735S display test - CircuitPython (Pico W) - NOT WORKING
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
"""
This test will initialize the display using displayio and draw a solid green
background, a smaller purple rectangle, and some yellow text.
"""
import board
import terminalio
@toxicantidote
toxicantidote / fridge_gui.py
Last active March 27, 2024 10:56
Fridge GUI/control
import board
from micropython import const as S
## Screen parameters
LCD_WIDTH = S(130)
LCD_HEIGHT = S(64)
LCD_ROTATION = S(0)
## Button thresholds
THRESHOLD_BLUE = S(8000)
@toxicantidote
toxicantidote / fridge_fault_bridge.ino
Last active March 8, 2024 10:25
Compressor interfacing for new fridge controller
// pins where things are connected
#define PIN_INTERRUPT 2
#define PIN_LED_R 11
#define PIN_LED_G 10
#define PIN_LED_B 9
#define PIN_STATUS 13
#define PIN_RELAY_1 A0