Basically a lamp I bought had broken but was stuck in the on position so I attached a motion detection sensor to it so the lamp would turn on when I walked in the room. In this project I used a Tessel, motion detection sensor (PIR), and the relay module to hook it all together.
- Attach relay module to the lamp in question.
- Plug the relay module into your tessel's slot A.
- Plug the PIR motion sensor into your tessel's GPIO bank. (See diagram below)
tessel run index.js
PIR Sensor --> Tessel GPIO GND --> GND OUT --> G3 VCC --> 3.3vode>