Ensure you have made all the connections noted in the Fritzing diagram on the Overview page.
Program the Trinket out of the circuit, then place in the headers on the circuit board. I recommend using headers over soldering directly in due to the connections to Pin 3.
Power up the circuit. The battery should probably charge with the CHRG light lit on the LiPo charger circuit board. The Trinket green LED should be lit. If not, unplug and check your connections.
When working right, the red LED on Trinket is probably blinking showing the sensors that are tripped - this is normal as the PIR sensor probably sees you moving and you might not have the magnets against the mag sensors. Place the magnets next to the mag sensors and aim the PIR away from you. The system should "set up" (no blinking). Then when you move in front of the sensor it should blink once a second or so with more blinks depending on which sensors tripped as follows:
The system state is also broadcast via serial to an Adafruit Bluefruit EZ-Link at 9600 baud. It transmits up to 10 meters (33 feet).
With a laptop/PC with a Bluetooth Receiver, determine which serial port is connected to Bluetooth for your operating system (for Windows, go to Control Panel, Devices and Printers - if you do not see Adafruit Bluefruit listed, use the Bluetooth program in the systems tray (lower right, tiny B icon) to add it to your Bluetooth device list. You may have to press the pair button on the Bluefruit board to have it recognized.
To listen in on the serial stream, you should load a terminal program. Your operating system should have one, you might have to Google to determine it. For Windows, you can download a good free terminal program called PuTTY at this website.
Open your terminal window and set it to work on a Serial stream. Set your serial port (Windows COMxx where xx is the number of the port you found in Control Panel earlier). The baud rate is 9600. When you press the Open button, a black terminal screen should be displayed with white text output from the Bluetooth serial stream.
Program the Trinket out of the circuit, then place in the headers on the circuit board. I recommend using headers over soldering directly in due to the connections to Pin 3.
Power up the circuit. The battery should probably charge with the CHRG light lit on the LiPo charger circuit board. The Trinket green LED should be lit. If not, unplug and check your connections.
When working right, the red LED on Trinket is probably blinking showing the sensors that are tripped - this is normal as the PIR sensor probably sees you moving and you might not have the magnets against the mag sensors. Place the magnets next to the mag sensors and aim the PIR away from you. The system should "set up" (no blinking). Then when you move in front of the sensor it should blink once a second or so with more blinks depending on which sensors tripped as follows:
- No blinks - secure
- One blink - PIR tripped
- Two blinks - Magnetic Sensor 2 tripped
- Three blinks - Magnetic Sensor 3 tripped
- Four blinks - PIR and Mag Sensor 2 tripped
- Five blinks - PIR and Mag Sensor 3 tripped
- Six blinks - both magnetic sensors tripped
- Seven blinks - all sensors tripped
The system state is also broadcast via serial to an Adafruit Bluefruit EZ-Link at 9600 baud. It transmits up to 10 meters (33 feet).
With a laptop/PC with a Bluetooth Receiver, determine which serial port is connected to Bluetooth for your operating system (for Windows, go to Control Panel, Devices and Printers - if you do not see Adafruit Bluefruit listed, use the Bluetooth program in the systems tray (lower right, tiny B icon) to add it to your Bluetooth device list. You may have to press the pair button on the Bluefruit board to have it recognized.
To listen in on the serial stream, you should load a terminal program. Your operating system should have one, you might have to Google to determine it. For Windows, you can download a good free terminal program called PuTTY at this website.
Open your terminal window and set it to work on a Serial stream. Set your serial port (Windows COMxx where xx is the number of the port you found in Control Panel earlier). The baud rate is 9600. When you press the Open button, a black terminal screen should be displayed with white text output from the Bluetooth serial stream.
Troubleshooting
The Bluefruit should have both red and blue flashing LEDs at this point. If not, double check that Trinket Pin 0 is connected to Bluefruit RX and you have GND and Vin connected to circuit ground and BAT+ respectively.If PuTTY complains about no COM port found, double check the devices in Control Panel -> Devices and Printers and ensure the white "refrigerator" icon is there for Adafruit Bluefruit. If not, open the Bluetooth center by going to the right bottom of the screen, click the arrow to show all notification icons, select the oval with the blue B in it and pair your Bluefruit by pressing the pair button on Bluefruit. Note the COM port that the Bluetooth is using for Bluefruit and use that in PuTTY. Ensure the baud rate is 9600 (or if you changed that in the code you set it the same). The text output is so infrequent, 9600 baud does not slow the circuit down any.
Page last edited December 29, 2013
Text editor powered by tinymce.