Commit Graph

100 Commits

Author SHA1 Message Date
b7b6475ee9 docs: confirm Pico W BLE unsupported in Zephyr mainline too
Checked Zephyr main: dts/bindings/bluetooth has only UART-based Infineon BT-HCI
bindings (infineon,bt-hci-uart / cyw208xx-hci / bless-hci) and no
CYW43-BT-over-gSPI HCI driver; rpi_pico_rp2040_w.dts only adds
infineon,cyw43-gpio. So Pico W BLE needs a custom out-of-tree HCI driver.
Working BLE remains available on a controller board (e.g. ESP32 hci_esp32).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 16:10:27 +02:00
8cb641da5a Build with Zephyr v3.7.0/SDK 0.16.8; fix devicetree, verify targets
Set up a local Zephyr toolchain and actually built the firmware, fixing the
issues that surfaced and recording real results.

Devicetree fixes (compile errors / silent no-ops):
- Wrap bare gpios-only nodes (heartbeat, piezo, IR RX, and the GPIO IR TX on
  the stub boards) in gpio-leds / gpio-keys so DT emits the GPIO cell macros.
- Rename the battery ADC node to "zephyr,user" so its io-channels is exposed.

Verified building (Zephyr v3.7.0, SDK 0.16.8, ARM toolchain):
- rpi_pico (39.9K/14.0K), rpi_pico/rp2040/w (68.1K/20.2K),
  nucleo_f401re (37.4K/15.1K), nrf52840dk BLE (137.7K/28.3K). All clean.

Pico W BLE finding: the image links with the BLE stack, but Zephyr v3.7 has no
HCI transport for the Pico W (CYW43 BT shares the Wi-Fi gSPI bus; the in-tree
AIROC driver is UART-only), so bt_enable() returns -ENODEV at runtime and BLE
stays inactive while the rest of the firmware runs. The same ble_nus.c is
verified linking against a real controller on nrf52840dk. Clarified the runtime
log, the W board conf, README and migration-notes accordingly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 11:47:58 +02:00
f2de891ea3 Make IR real-time/non-blocking, harden for Pico W, optimize
Primary target is now the Pico W; functionality preserved on other boards.

IR TX (RP2040/PWM): rewritten to a non-blocking, real-time symbol state
machine. A hardware-PWM 56 kHz/40% carrier is gated by a one-shot k_timer
(mark/space flips in the timer ISR), so TX never busy-waits and runs
concurrently with IR RX, BLE and everything else. Queued frames (BLE "bomb")
are sent back-to-back with a 50 ms inter-frame gap. Boards whose ir-tx is a
plain GPIO keep the (blocking) software bit-bang carrier as a fallback.

IR RX: cycle timestamps captured in the ISR, converted to us off the
interrupt path in the decode work item (lower ISR jitter).

Fixes:
- Heartbeat moved off GPIO25 (CYW43 WL_CS on Pico W) to GPIO14 to avoid
  corrupting WiFi/BLE.
- APP_BLE now selects BT_DEVICE_NAME_DYNAMIC (bt_set_name needs it).

Optimizations:
- RGB rewritten with integer math (no soft-float on the FPU-less M0+).
- CONFIG_SIZE_OPTIMIZATIONS; 100 us tick so OLT symbol durations schedule
  exactly.

Pico W: boards/rpi_pico_rp2040_w.conf enables BLE out of the box.

Docs: resolved hardware TODOs (battery cell-count divider, PWM channel math,
heartbeat, carrier), README primary target = Pico W, inline comments.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 16:44:39 +02:00
9149761c82 Add Zephyr RTOS port of OpenLaserTag remote control
Port the MicroPython firmware to a maintainable Zephyr C application under
zephyr_app/, alongside the untouched original reference implementation.

- OLT IR protocol in pure C (olt_proto) with a host unit test
- buttons, piezo, RGB PWM, battery ADC, IR TX (software 56 kHz carrier),
  IR RX (edge-capture + timeout decode), and gated BLE Nordic UART service
- uasyncio tasks mapped to Zephyr threads / workqueues / k_timer
- rpi_pico overlay (full) plus esp32 and nucleo_f401re stubs
- prj.conf / Kconfig / overlay-ble.conf build configuration
- docs/migration-notes.md: hardware inventory, module/API maps, open questions

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 15:38:26 +02:00
f9bdd86e6d Update 'README.md'
ble uart terminal commands
2024-06-22 00:22:02 +01:00
35eec38e55 versio 1.0 release update 2024-06-22 01:19:05 +02:00
0b02f5e12c version 1.0 relase 2024-06-22 01:13:41 +02:00
ba310c309a add piezo 2024-06-21 00:40:27 +02:00
7dee992956 Update 'README.md' 2024-06-19 20:32:09 +01:00
2c4515df4d up 2024-06-19 20:04:25 +01:00
1a99433407 Delete 'LT_remote_control_box.md' 2024-06-18 15:01:50 +01:00
80e889fedc up 2024-06-18 14:56:32 +01:00
1e17632262 up remote info 2024-06-18 14:47:08 +01:00
74009d5180 remote red led only setup 2024-06-18 00:28:54 +02:00
bf810ad31b from BLE UART to custom IR TX 2024-06-06 16:36:01 +02:00
772244153e change BLE handler to async 2024-06-06 15:51:24 +02:00
448ca2dbcf add bomb command to BLE UART 2024-06-06 15:02:54 +02:00
e1e1440b29 audio test 2024-06-06 13:38:39 +02:00
beb5129c1d up imports 2024-05-30 11:00:34 +02:00
ff9906ca71 up batt monitor 2024-05-30 10:49:52 +02:00
50dbb17dd5 up logging on rx module 2024-05-30 01:13:12 +02:00
8163706f08 up voltage 2024-05-29 23:51:26 +02:00
820255925c add battery voltage monitoring 2024-05-29 22:17:52 +02:00
db0f4233fd up BLE UART 2024-05-29 17:02:53 +02:00
d91153dbc5 add battery voltage read 2024-05-29 15:32:33 +02:00
47ccba5c3e add test shot and decode shot 2024-05-29 14:32:32 +02:00
4f5674ada5 add shot decode 2024-05-29 14:28:40 +02:00
a4c6cea3ef up ir rx callback 2024-05-29 13:40:59 +02:00
53c256556b up 2024-05-29 13:10:42 +02:00
d1cab8763f Update 'README.md' 2024-05-29 12:07:50 +01:00
846c7dba04 Update 'README.md' 2024-05-29 12:06:13 +01:00
63397cf2fb Update 'README.md' 2024-05-29 11:54:31 +01:00
431686d4bf up info 2024-05-29 11:53:45 +01:00
f5d5777b90 Update 'LT_remote_control_box.md' 2024-05-29 10:43:33 +01:00
56afa0add3 up remote info 2024-05-29 10:43:04 +01:00
02a4dd8329 up 2024-05-29 10:35:47 +01:00
9830489843 Merge remote-tracking branch 'origin/HEAD' 2024-05-29 11:34:56 +02:00
610abb3cfd ir rx add Pin.PULL_UP 2024-05-29 11:32:19 +02:00
9ec6cf59a3 up 2024-05-29 10:26:38 +01:00
e71d7d2435 Update 'LT_remote_control_box.md' 2024-05-29 10:18:23 +01:00
d8083b84f5 Merge remote-tracking branch 'origin/HEAD' 2024-05-29 08:37:26 +02:00
7e0d21d627 up info 2024-05-29 08:33:08 +02:00
c7fb899083 fix shot ir rx check 2024-05-28 23:41:54 +02:00
e655a75115 up device id for BLE device name 2024-05-28 23:27:06 +02:00
65b0f86732 up device id 2024-05-28 18:57:20 +02:00
12fec2f5ec send IR RX on BLE UART 2024-05-28 18:16:44 +02:00
bc983bdd39 add BLE UART, test work 2024-05-28 17:59:53 +02:00
1bea9dfa0b fix debug 2024-05-28 17:19:12 +02:00
6470007a42 up commands 2024-05-28 17:05:46 +02:00
8f468ff531 up 2024-05-28 17:01:07 +02:00