Commit Graph
83 Commits
Author SHA1 Message Date
jimmy e91b291dc6 Remove off from random test 2025-10-26 22:05:52 +13:00
jimmy 2db9b3464a Add random test suite 2025-10-26 21:33:31 +13:00
jimmy 8345b31caf Refactor n_chase pattern for bidirectional movement
- Updated n_chase to support bidirectional movement with n3 and n4 parameters
- n3 controls forward steps per direction change
- n4 controls backward steps per direction change
- Pattern alternates between moving forward n3 steps and backward n4 steps
- Each direction repeats for the specified number of steps before switching
- Added test/9.py with n1=20, n2=20, n3=20, n4=-5 parameters
- Updated to run as a thread-based pattern similar to other patterns
2025-10-26 20:39:28 +13:00
jimmy dce2954114 Refactor rainbow pattern to travel along the length of LED strip
- Modified rainbow() to distribute colors along the physical length
- Each LED gets a different hue based on its position
- n1 parameter controls how many times the rainbow cycles (nodes)
- Split rainbow tests into test/rainbow/ directory with 9 numbered test files
- Each test runs forever until interrupted
- Added main.py to run all tests in sequence repeatedly
2025-10-26 20:19:21 +13:00
jimmy 355d113e32 Fix rainbow pattern synchronization in LED bar
- Use controller's step for synchronization instead of internal step counter
- Rainbow pattern now syncs with controller timing like n_chase pattern
- Prevents rainbow from running independently and out of sync
- Uses beat_index % 256 for full color wheel cycling
2025-09-19 01:29:48 +12:00
jimmy d715af4344 Fix n_chase pattern to properly chase through all LED positions
- Replace oscillating behavior with proper chasing movement
- Use pattern_step for internal tracking instead of controller's step
- Calculate position relative to chase head: (i - pattern_step) % num_leds
- Chase head moves through all LED positions with n3 step multiplier
- n1 controls width of lit chase segment
2025-09-19 00:22:25 +12:00
jimmy 67c4a1a6f6 Update LED bar to handle message type field
- Process 't' field to distinguish between beat ('b') and update ('u') messages
- Beat messages: execute pattern immediately using current parameters
- Update messages: only update parameters, don't execute pattern
- Maintains backward compatibility with default to beat if 't' not specified
- Enables proper synchronization between controller and bars
2025-09-18 22:10:23 +12:00
jimmy 748ad4b507 Add n3 step rate functionality to patterns 2025-09-18 20:35:21 +12:00
jimmy 1275d60aaa Make alternating pattern timing independent of n1
- Changed alternating pattern to return delay/2 instead of delay
- Each phase now lasts delay/2, making full cycle equal to delay
- n1 now only controls ON/OFF segment width, not timing
2025-09-18 19:11:35 +12:00
jimmy d8e853183b main: enforce event-driven behavior; run selected pattern once per message; clarify comments; fix pattern lookup 2025-09-17 20:20:41 +12:00
jimmy 8cfb3e156b patterns: add rainbow, specto, and radiate (out then dark-out)
radiate: origins every n1, step by delay, stop when full, dark wave outward, ensure strip off at end, run once

alternating: use n1 as ON width and n2 as OFF width; phase via self.step

pulse: attack (n1), hold (delay), decay (n2); stop at end

tests: add specto sweep (n1_sequence) and radiate demo; include n index per message; use nested {name:{...}} schema; support iterations/repeat-delay
2025-09-16 22:28:51 +12:00
jimmy d599af271b patterns: alternating uses n1 (on) and n2 (off); ensure visible ON color; return delay; phase via self.step
test: WS client sends nested {name:{...}}; add iterations and repeat-delay; include n per message; use n1/n2 for alternating
2025-09-16 21:22:47 +12:00
jimmy 93560a253e patterns: fix blink timing; slow alternating; unify self-test with absolute tick scheduling 2025-09-15 14:12:43 +12:00
jimmy d68817ea18 Pipfile.lock: update lockfile 2025-09-15 12:58:51 +12:00
jimmy a7a2274a59 Pipfile: sync dependencies 2025-09-15 12:58:45 +12:00
jimmy df838dc4d6 settings: adjust defaults and color order handling 2025-09-15 12:58:39 +12:00
jimmy 4ec48b9f8f main: update loop/test harness configuration 2025-09-15 12:58:30 +12:00
jimmy 1456ed8a6e boot: minor adjustments 2025-09-15 12:58:20 +12:00
jimmy 80d5a66fab patterns: centralize timing in tick(); remove selected-delay coupling; update self-test to use per-config durations 2025-09-15 12:56:57 +12:00
jimmy 44cb35d1aa Split into pattern and low level methods 2025-09-05 23:29:18 +12:00
jimmy fc080f7796 Add watchfiles 2025-08-26 22:53:48 +12:00
jimmy 70fe5a0cdc Add watchfiles 2025-08-11 22:15:21 +12:00
jimmy 2a7b5527a5 Move gc and wdt to function 2025-08-03 19:39:25 +12:00
jimmy 50545e3170 Remove random patterns 2025-08-03 19:29:10 +12:00
jimmy d2826a0f63 Swtich to names isntead of ids 2025-07-12 10:22:17 +12:00
jimmy 87fc74bb51 Add flicker pattern 2025-07-12 10:21:43 +12:00
jimmy 03f3f02da8 Remove wifi client 2025-06-19 19:13:13 +12:00
jimmy 524db5e979 Move espnow to seperate file 2025-06-19 19:05:08 +12:00
jimmy 279416cded Add set_pattern_step 2025-06-19 19:03:22 +12:00
jimmy fbd14f2e16 If no ids run set_settings 2025-06-12 21:32:24 +12:00
jimmy 1989f6f5c9 Switch to list for colors 2025-06-12 21:29:31 +12:00
jimmy a19b1e86f2 Have to save when using espnow 2025-06-08 13:18:28 +12:00
jimmy c63e907204 espnow if id is 0 call set_settings 2025-06-04 21:07:15 +12:00
jimmy b7920e224f Add color order 2025-06-04 21:02:55 +12:00
jimmy 42e92dafc8 Add led pin setting 2025-06-04 20:03:51 +12:00
jimmy 0b6eb9724f Add device ID 2025-06-04 19:54:06 +12:00
jimmy 55ef5c1580 Move json load out of set_settings 2025-06-04 19:22:09 +12:00
jimmy c15f9787a7 Sync after going through all the keys 2025-06-02 00:32:43 +12:00
jimmy 3d0078f118 Update leds straight away after a sync 2025-06-02 00:18:25 +12:00
jimmy 9e72dba035 Check all keys before returning 2025-06-02 00:16:58 +12:00
jimmy 3d7dd754eb Wifi and ESPNOW don't work at the same time 2025-06-02 00:15:31 +12:00
jimmy 2dd20fa51b Enable garabage collection 2025-05-28 21:19:56 +12:00
jimmy d33bd6b0e4 Enable watchdog timer 2025-05-28 21:17:23 +12:00
jimmy 8902adf18c Fix color transition 2025-05-24 13:09:28 +12:00
jimmy 9abd425f46 Add wifi 2025-05-22 22:02:49 +12:00
jimmy ee28b5805d Change title and h1 to "name" 2025-05-22 22:02:29 +12:00
jimmy ec29dbdd01 Add color order 2025-05-19 22:00:35 +12:00
jimmy 3fa9377438 Add set_settings to Settings class 2025-05-19 21:59:43 +12:00
jimmy ec049b52c0 Only check wifi settings if not connected 2025-05-19 19:35:29 +12:00
jimmy a009ea85bc Add wifi settings 2025-05-19 19:32:53 +12:00
jimmy bd2e6e56cf Check if ssid, password, ip and gateway are "" 2025-05-19 19:31:30 +12:00
jimmy 37c7280a15 Get ap password from settings 2025-05-19 19:28:11 +12:00
jimmy 2f10d4cabd Fix rgb order 2025-05-19 19:24:17 +12:00
jimmy 385dcffe68 Add led pin in settings 2025-05-19 19:22:38 +12:00
jimmy fa0578349b Delete index_html.py 2025-05-18 21:28:44 +12:00
jimmy 4a36ff0da0 Update main.py 2025-05-18 21:28:41 +12:00
jimmy bd4046572c Update main.css 2025-05-18 21:28:38 +12:00
jimmy fdd299b063 Update main.js 2025-05-18 21:28:34 +12:00
jimmy a44ef2d0ad Update index.html 2025-05-18 21:28:29 +12:00
jimmy 2d1208e223 Update web.py 2025-05-18 21:28:21 +12:00
jimmy 67279a8f46 Update wifi.py 2025-05-18 21:28:14 +12:00
jimmy a52ac3df99 Update Pipfile.lock 2025-05-18 21:27:58 +12:00
jimmy c4356cf354 Switch to web socket 2025-05-18 21:26:33 +12:00
jimmy 0c219e0697 Add websocket settings endpoint 2025-05-12 22:22:05 +12:00
jimmy cee8c20176 Always sync 2025-05-12 22:21:11 +12:00
jimmy 135f6b06f8 Ignore .venv 2025-05-07 19:46:28 +12:00
jimmy 0aa3803f20 Add espnow 2025-04-21 21:52:20 +12:00
jimmy ed3351a20b Have single json endpoint 2025-04-21 21:51:55 +12:00
jimmy c8bcb85062 Add mac. Remove wifi settings 2025-04-21 21:51:15 +12:00
jimmy 17d33d98e2 Send to a single json endpoint 2025-04-21 21:50:27 +12:00
jimmy afaf4c02e4 Change and and defaults
Add set_settings
2025-04-21 21:49:51 +12:00
jimmy e1e472b2e4 Remove wifi connect 2025-04-21 21:48:36 +12:00
jimmy 2f6704a346 Add screenshots 2025-02-06 22:45:58 +13:00
jimmy 60dddafc04 Add wifi ap connection info 2025-02-06 22:45:29 +13:00
jimmy db94530f29 Change to PORTNAME 2025-02-06 22:39:10 +13:00
jimmy 31081d98ee Add micropython install instructions 2025-02-06 22:36:29 +13:00
jimmy b681ff02d8 Add esptool 2025-02-06 22:36:03 +13:00
jimmy 822bbc40e6 Add install instructions 2025-02-06 22:28:22 +13:00
jimmy ec8aa5317e Add pipenv 2025-02-06 22:20:17 +13:00
jimmy 1aa36a3a63 Disable 1 step forward 2 back 2025-02-06 22:19:55 +13:00
jimmy 7b27cf7716 Add pipenv 2025-02-06 22:19:30 +13:00
jimmy a550b60dd0 Do a initial wdt feed 2025-02-06 22:19:08 +13:00
jimmy c3fb9566da Initial commit 2025-01-18 16:26:30 +13:00