-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest_led_flow.sh
More file actions
executable file
·32 lines (29 loc) · 869 Bytes
/
test_led_flow.sh
File metadata and controls
executable file
·32 lines (29 loc) · 869 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
echo "Testing LED Control Flow"
echo "========================"
echo ""
# Check if bridge is built
if [ ! -f .build/release/bt4bridge ]; then
echo "❌ Bridge not built. Building now..."
swift build -c release
fi
echo "✅ Bridge executable found"
echo ""
echo "To test LED control:"
echo "1. Terminal 1: Run '.build/release/bt4bridge'"
echo "2. Wait for 'PG_BT4 connected' message"
echo "3. Terminal 2: Run './send_cc.swift 16 127'"
echo "4. You should see:"
echo " - In bridge logs: 'LED 1 ON' or similar"
echo " - Physical LED 1 should turn ON"
echo ""
echo "LED Command Reference:"
echo " CC 16 = LED 1"
echo " CC 17 = LED 2"
echo " CC 18 = LED 3"
echo " CC 19 = LED 4"
echo " Value >= 64 = ON, < 64 = OFF"
echo ""
echo "Expected LED commands sent to device:"
echo " LED ON: A2 1X 00 (reversed logic!)"
echo " LED OFF: A2 1X 01"