Skip to content

Conversation

@pidge
Copy link
Member

@pidge pidge commented Oct 23, 2025

Need to check actual PIR pin and trigger level.

- Connect PIR motion sensor on GPIO pin 2
- Track last motion time and only send AC OFF after 1 hour of no motion
- Reset AC off flag when motion is detected to allow re-triggering
- Add serial output for debugging motion detection and AC commands
- Compatible with Adafruit PIR sensor (product #4871)

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

Co-Authored-By: Claude <[email protected]>
- Test compilation on Arduino Uno, ESP8266, and ESP32 boards
- Verify both ir_sender and ir_receiver sketches build successfully
- Install IRremote library v4.1.2 as required by the code
- Run on all pushes and pull requests

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

Co-Authored-By: Claude <[email protected]>
- Migrate from old IRremote 2.x API to 4.x API for consistency
- Change include from <IRremote.h> to <IRremote.hpp>
- Use IrReceiver global object instead of IRrecv class
- Update decode() method and data access patterns
- Convert rawbuf values using MICROS_PER_TICK for correct timing
- Update dump() function to use new API and IrSender naming

This fixes CI build failures by ensuring both sketches use the same
IRremote library version (4.1.2).

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

Co-Authored-By: Claude <[email protected]>
Replace manual raw buffer access with library helper functions:
- Use printIRResultShort() for formatted output
- Use printIRSendUsage() to print C array format for sender
- Remove custom dump() function that accessed rawDataPtr
- Simplify code to use only well-documented API functions

This should fix compilation errors by using stable, documented
IRremote 4.x API instead of trying to access internal structures.

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

Co-Authored-By: Claude <[email protected]>
@pidge pidge changed the title Claude/ac motion sensor control 011 cuqz8r c9w47 ybx5cai cez Claude/ac motion sensor control Oct 23, 2025
@pidge
Copy link
Member Author

pidge commented Oct 23, 2025

@claude CI is failing dude

pidge and others added 2 commits October 23, 2025 17:27
IRremote 4.1.2 is incompatible with ESP32 Arduino core 3.x due to
deprecated timer API functions. Version 4.4.1 includes fixes for
ESP32 core 3.x compatibility.

Changes:
- Update CI workflow to install [email protected]
- Update version comments in both sketches
- Tested locally on all three platforms (Uno, ESP8266, ESP32)
- All builds pass successfully

Fixes ESP32 compilation errors:
- timerAlarmEnable/timerAlarmDisable not declared
- timerBegin/timerAttachInterrupt signature changes
- ledcSetup/ledcAttachPin not declared

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

Co-Authored-By: Claude <[email protected]>
Add sketch.yaml files to both sketches defining build profiles for:
- Arduino Uno (AVR)
- ESP8266 (NodeMCU v2)
- ESP32

Update CI workflow to use profile-based compilation instead of manual
platform/library installation. This provides:
- Isolated, reproducible builds
- Auto-download of dependencies
- Consistent behavior between local dev and CI
- Simplified CI configuration

Each profile specifies:
- FQBN (Fully Qualified Board Name)
- Platform version
- IRremote library version (4.4.1)
- Platform index URLs for ESP boards

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

Co-Authored-By: Claude <[email protected]>
@pidge pidge changed the title Claude/ac motion sensor control Motion sensor delay Oct 23, 2025
@pidge pidge requested a review from md1024 October 23, 2025 21:41
@pidge
Copy link
Member Author

pidge commented Oct 23, 2025

@md1024 Claude has some code for you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants