-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_plotter.sh
More file actions
executable file
·35 lines (28 loc) · 985 Bytes
/
run_plotter.sh
File metadata and controls
executable file
·35 lines (28 loc) · 985 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
33
34
35
#!/bin/bash
# Liberty Pad Serial Plotter Launcher
# This script activates the virtual environment and runs the plotting script
echo "Liberty Pad Serial Data Plotter"
echo "==============================="
# Check if virtual environment exists
if [ ! -d "venv" ]; then
echo "Error: Virtual environment not found. Please run:"
echo "python3 -m venv venv"
echo "source venv/bin/activate"
echo "pip install pyserial matplotlib"
exit 1
fi
# Activate virtual environment
source venv/bin/activate
# Check if ESP32 is connected
if [ ! -e "/dev/cu.usbmodem1101" ]; then
echo "Warning: ESP32 not found at /dev/cu.usbmodem1101"
echo "Available serial ports:"
ls /dev/cu.* 2>/dev/null || echo "No USB serial ports found"
echo ""
echo "You can specify a different port with: --port /dev/cu.yourport"
fi
echo "Starting plotter..."
echo "Press Ctrl+C to stop"
echo ""
# Run the plotter with arguments passed to this script
python3 serial_plotter.py "$@"