aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoe <rbo@gmx.us>2025-09-20 03:52:56 +0200
committerjoe <rbo@gmx.us>2025-09-20 03:52:56 +0200
commit7758750d4c99e1a9be8abe7cd0b269ecddb12dab (patch)
tree2676ee5974a2567099e3f98a0b37ffa87192c9a4
downloadhalfcab-7758750d4c99e1a9be8abe7cd0b269ecddb12dab.tar.gz
halfcab-7758750d4c99e1a9be8abe7cd0b269ecddb12dab.tar.bz2
halfcab-7758750d4c99e1a9be8abe7cd0b269ecddb12dab.tar.xz
halfcab-7758750d4c99e1a9be8abe7cd0b269ecddb12dab.tar.zst
halfcab-7758750d4c99e1a9be8abe7cd0b269ecddb12dab.zip
good
Diffstat (limited to '')
-rw-r--r--.gitignore205
-rw-r--r--Makefile55
-rw-r--r--esp/halfcab/halfcab.ino100
3 files changed, 360 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..7f06b7f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,205 @@
+# Created by https://www.toptal.com/developers/gitignore/api/c
+# Edit at https://www.toptal.com/developers/gitignore?templates=c
+
+### C ###
+# Prerequisites
+*.d
+
+# Object files
+*.o
+*.ko
+*.obj
+*.elf
+
+# Linker output
+*.ilk
+*.map
+*.exp
+
+# Precompiled Headers
+*.gch
+*.pch
+
+# Libraries
+*.lib
+*.a
+*.la
+*.lo
+
+# Shared objects (inc. Windows DLLs)
+*.dll
+*.so
+*.so.*
+*.dylib
+
+# Executables
+*.exe
+*.out
+*.app
+*.i*86
+*.x86_64
+*.hex
+
+# Debug files
+*.dSYM/
+*.su
+*.idb
+*.pdb
+
+# Kernel Module Compile Results
+*.mod*
+*.cmd
+.tmp_versions/
+modules.order
+Module.symvers
+Mkfile.old
+dkms.conf
+
+# End of https://www.toptal.com/developers/gitignore/api/c
+# Created by https://www.gitignore.io/api/c++,linux,emacs,windows
+# Edit at https://www.gitignore.io/?templates=c++,linux,emacs,windows
+
+### C++ ###
+# Prerequisites
+*.d
+
+# Compiled Object files
+*.slo
+*.lo
+*.o
+*.obj
+
+# Precompiled Headers
+*.gch
+*.pch
+
+# Compiled Dynamic libraries
+*.so
+*.dylib
+*.dll
+
+# Fortran module files
+*.mod
+*.smod
+
+# Compiled Static libraries
+*.lai
+*.la
+*.a
+*.lib
+
+# Executables
+*.exe
+*.out
+*.app
+
+### Emacs ###
+# -*- mode: gitignore; -*-
+*~
+\#*\#
+/.emacs.desktop
+/.emacs.desktop.lock
+*.elc
+auto-save-list
+tramp
+.\#*
+
+# Org-mode
+.org-id-locations
+*_archive
+
+# flymake-mode
+*_flymake.*
+
+# eshell files
+/eshell/history
+/eshell/lastdir
+
+# elpa packages
+/elpa/
+
+# reftex files
+*.rel
+
+# AUCTeX auto folder
+/auto/
+
+# cask packages
+.cask/
+dist/
+
+# Flycheck
+flycheck_*.el
+
+# server auth directory
+/server/
+
+# projectiles files
+.projectile
+
+# directory configuration
+.dir-locals.el
+
+# network security
+/network-security.data
+
+
+### Linux ###
+
+# temporary files which can be created if a process still has a handle open of a deleted file
+.fuse_hidden*
+
+# KDE directory preferences
+.directory
+
+# Linux trash folder which might appear on any partition or disk
+.Trash-*
+
+# .nfs files are created when an open file is removed but is still being accessed
+.nfs*
+
+### Windows ###
+# Windows thumbnail cache files
+Thumbs.db
+Thumbs.db:encryptable
+ehthumbs.db
+ehthumbs_vista.db
+
+# Dump file
+*.stackdump
+
+# Folder config file
+[Dd]esktop.ini
+
+# Recycle Bin used on file shares
+$RECYCLE.BIN/
+
+# Windows Installer files
+*.cab
+*.msi
+*.msix
+*.msm
+*.msp
+
+# Windows shortcuts
+*.lnk
+
+# End of https://www.gitignore.io/api/c++,linux,emacs,windows
+
+sketch.yaml
+hc
+.ccls*
+tags
+TAGS
+*.core
+vgcore.*
+*.supp
+tmpmap*
+*.txt
+*.json
+*.png
+*.wav
+*.tar.*
+*.tgz
+*.txz
+*.zst
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..8f6cc11
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,55 @@
+# =====================
+# ==== ===============
+# =====================
+# === === ==== ==
+# ==== == == = =
+# ==== == = == =
+# ==== == = == ====
+# ==== == = == = =
+# = = === ==== ==
+# == ================
+# =====================
+#
+# halfcab: Makefile
+# Fri, 19 Sep 2025 23:48:21 +0200
+# joe <rbo@gmx.us>
+#
+# GNU Makefile
+
+default: esp
+
+ESP_DIR = esp/halfcab/
+OBJ_DIR = obj/
+SRC_DIR = src/
+TRGT_DIR = ./
+
+ESP_FQBN = esp8266:esp8266:d1_mini
+ESP_DEV = /dev/ttyUSB0
+
+TRGT_NAME = hc
+
+ESP_NAME = halfcab.ino
+
+ARDUINO = arduino-cli
+CC = cc
+CFLAGS = -std=c89
+CFLAGS += -Wall
+CFLAGS += -Wextra
+CFLAGS += -Werror
+CFLAGS += -pedantic
+CFLAGS += -march=haswell
+CFLAGS += -O2
+CFLAGS += -pipe
+
+esp:
+ ${ARDUINO} compile -v -j8 --warnings all --fqbn ${ESP_FQBN} ${ESP_DIR}
+ ${ARDUINO} upload -p ${ESP_DEV} --fqbn ${ESP_FQBN} ${ESP_DIR}
+
+attach:
+ ${ARDUINO} board attach -p ${ESP_DEV} -b ${ESP_FQBN} ${ESP_DIR}${ESP_NAME}
+
+mon:
+ ${ARDUINO} monitor -p ${ESP_DEV} -b ${ESP_FQBN} --config 115200 --config 'rts=off' --config 'dtr=off' --quiet
+
+
+.PHONY: esp attach mon
diff --git a/esp/halfcab/halfcab.ino b/esp/halfcab/halfcab.ino
new file mode 100644
index 0000000..b5a0d49
--- /dev/null
+++ b/esp/halfcab/halfcab.ino
@@ -0,0 +1,100 @@
+/*
+ * =====================
+ * ==== ===============
+ * =====================
+ * === === ==== ==
+ * ==== == == = =
+ * ==== == = == =
+ * ==== == = == ====
+ * ==== == = == = =
+ * = = === ==== ==
+ * == ================
+ * =====================
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ * Copyright (c) 2025, joe
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of the organization nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ''AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * halfcab: eps/halfcab.ino
+ * Sat, 20 Sep 2025 00:17:38 +0200
+ * joe <rbo@gmx.us>
+ *
+ * this is going straight to the esp
+ */
+
+#include <FastLED.h>
+
+#define DATA_PIN D2
+#define NUM_LEDS 60
+#define BRIGHTNESS 254
+#define LED_TYPE WS2812B
+#define COLOR_ORDER GRB
+
+#define BLACK CRGB(0, 0, 0)
+#define RED CRGB(255, 0, 0)
+#define GRUV CRGB(255, 80, 0)
+
+CRGB leds[NUM_LEDS];
+
+void
+setup(void)
+{
+ uint8_t i;
+
+ FastLED.addLeds<LED_TYPE, DATA_PIN, COLOR_ORDER>(leds, NUM_LEDS);
+ FastLED.setBrightness(BRIGHTNESS);
+ FastLED.clear();
+ FastLED.show();
+ i = 0;
+ while (i < NUM_LEDS) {
+ leds[i] = GRUV;
+ i++;
+ }
+ FastLED.show();
+ // delay(50);
+ // while (i < 255) {
+ // FastLED.setBrightness(i);
+ // FastLED.show();
+ // delay(100);
+ // i += 10;
+ // }
+ // i = 0;
+ // while (i < NUM_LEDS) {
+ // leds[i] = BLACK;
+ // i++;
+ // }
+ // FastLED.show();
+}
+
+void
+loop(void)
+{
+ delay(10);
+}