Trinket-Alarme-Tester

De MCHobby - Wiki
Révision datée du 20 mai 2014 à 10:56 par Admin (discussion | contributions) (Page créée avec « {{Trinket-Alarme-NAV}} == Les tests == Ensure you have made all the connections noted in the Fritzing diagram on the Overview page. Program the Trinket out of the circuit, ... »)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)
Sauter à la navigation Sauter à la recherche


MCHobby investit du temps et de l'argent dans la réalisation de traduction et/ou documentation. C'est un travail long et fastidieux réalisé dans l'esprit Open-Source... donc gratuit et librement accessible.
SI vous aimez nos traductions et documentations ALORS aidez nous à en produire plus en achetant vos produits chez MCHobby.

Les tests

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:


  • 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

If the PIR is not indicating correctly, move the orange potentiometers to reduce or increase sensitivity. If it will not "go off", reduce the latch time.

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.

Modèle:ADF-Image

Dépannage

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.


Source: Trinket Bluetooth Alarm System

Tutoriel créé par MICHAEL BARELA pour AdaFruit Industries. Tutorial created by MICHAEL BARELA for AdaFruit Industries

Traduit et augmenté par Meurisse.D pour MCHobby.be

Traduit avec l'autorisation d'AdaFruit Industries - Translated with the permission from Adafruit Industries - www.adafruit.com

Toute référence, mention ou extrait de cette traduction doit être explicitement accompagné du texte suivant : «  Traduction par MCHobby (www.MCHobby.be) - Vente de kit et composants » avec un lien vers la source (donc cette page) et ce quelque soit le média utilisé.

L'utilisation commercial de la traduction (texte) et/ou réalisation, même partielle, pourrait être soumis à redevance. Dans tous les cas de figures, vous devez également obtenir l'accord du(des) détenteur initial des droits. Celui de MC Hobby s'arrêtant au travail de traduction proprement dit.