This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| LilyGO T-QT Pro (ESP32-S3FN4R2) + GC9107 128x128 (TFT_eSPI) | |
| ENS160 + AHT21 on I2C | |
| UI: | |
| - Black background, cyan text normally | |
| - If "BAD" (poor): black bg, RED text | |
| - If "DANGER" (harmful): once per second for 420ms bg turns ORANGE and the *cause* is shown in RED | |
| Buttons (T-QT Pro): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <Adafruit_NeoPixel.h> | |
| // ----------------- HW ----------------- | |
| static constexpr uint16_t LED_COUNT = 86; | |
| static constexpr uint8_t LED_PIN = 10; // XIAO D6 -> DIN WS2812 | |
| // TP223: VCC->3.3V, GND->GND, OUT->BTN_PIN | |
| static constexpr uint8_t BTN_PIN = 9; // XIAO D1 <- OUT TP223 | |
| // ----------------- Power/brightness ----------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <WiFi.h> | |
| #include <WebServer.h> | |
| #include <time.h> | |
| #include <Preferences.h> | |
| const int ledPin = 2; // Pin connected to the onboard LED | |
| // Relay settings | |
| const int relayPin = 27; // Pin connected to the relay | |
| bool relayState = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="1395", ATTR{idProduct}=="0300", \ | |
| RUN+="/usr/bin/bash -c 'modprobe -r snd_usb_audio; sleep 1; modprobe snd_usb_audio'" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [filament_switch_sensor filament_sensor] | |
| pause_on_runout: true | |
| switch_pin: ^PC15 # !PC15 original K1C config | |
| runout_gcode: | |
| {% if printer.extruder.can_extrude|lower == 'true' %} | |
| G91 | |
| G0 E30 F600 | |
| G90 | |
| {% endif %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -e | |
| # Simple logger | |
| log() { | |
| echo -e "\e[1;32m[INFO]\e[0m $*" | |
| } | |
| # 1. Ensure Docker is installed | |
| if ! command -v docker &> /dev/null; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # For more options and information see | |
| # http://rpf.io/configtxt | |
| # Some settings may impact device functionality. See link above for details | |
| # uncomment if you get no picture on HDMI for a default "safe" mode | |
| #hdmi_safe=1 | |
| # uncomment the following to adjust overscan. Use positive numbers if console | |
| # goes off screen, and negative if there is too much border | |
| #overscan_left=16 |