Files
wedding-phone/rotary_phone_web.py
grabowski e2218a0c9a Add comprehensive logging for extra button debugging
Added detailed console logging throughout button functionality:

Startup logging:
- Shows if button is enabled/disabled
- Displays GPIO pin number and pressed state
- Shows configured button sound file path

Button press detection:
- Logs when button is pressed in main loop
- Logs when button is pressed during recording
- Shows recording/playing state

Button sound playback:
- File path and existence check
- Audio file properties (rate, channels, width)
- Sample rate mismatch warnings
- Playback progress (chunk count)
- Volume level
- Detailed error messages with traceback

Recording loop enhancement:
- Added button checking INSIDE recording loop
- Previously button only checked in main loop
- Button now works during active recording

All logs prefixed with [BUTTON] for easy filtering.

This helps diagnose why button sound isn't playing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 15:50:21 +07:00

87 KiB