Modifications

Sauter à la navigation Sauter à la recherche
135 octets ajoutés ,  14 mai 2014 à 07:01
Ligne 6 : Ligne 6 :  
Cette configuration utilise des senseurs liées à la broche 3 (analogique) par l'intermédiaire de résistances. Le Trinket doit être programmé débranché du montage puisque les broches 3 et 4 sont utilisée par le connecteur USB.
 
Cette configuration utilise des senseurs liées à la broche 3 (analogique) par l'intermédiaire de résistances. Le Trinket doit être programmé débranché du montage puisque les broches 3 et 4 sont utilisée par le connecteur USB.
   −
The program uses the standard Softwareserial library to talk via the Bluefruit EZ-Link on Pin 0 for transmit, Pin 2 for receive. You can eliminate the requirement to specify a receive pin (and shrink the code slightly) with the third party SendOnlySoftwareSerial library on arduino.cc via this forum thread: [http://forum.arduino.cc/index.php?topic=112013.0 http://forum.arduino.cc/index.php?topic=112013.0.].  This would also allow you to use Pin 2 (Analog 1) for alarms, freeing Pin 3 shared with USB.
+
Le programme utilise la bibliothèque standard Softwareserial pour communiquer avec le Bluefruit EZ-Link. La broche 0 est utilisé pour la transmission et la broche 2 pour la réception. Vous pouvez très bien vous passer de spécifier la broche de réception (et réduire un peu la taille du code) en utilisant la bibliothèque tiers SendOnlySoftwareSerial disponible sur arduino.cc via le fil de discussion: [http://forum.arduino.cc/index.php?topic=112013.0 http://forum.arduino.cc/index.php?topic=112013.0.].  Cela vous permettrait alors d'utiliser la broche 2 (Analogique 1) pour les alarmes, libérant la broche 3 partagée avec USB.
    
Pin 1, which has the onboard red LED, is used as an indicator on which sensors are tripped. When the alarm is set (no alarms tripped), the LED does not blink. It blinks from 1 to 7 depending when sensors are tripped (1 for #1/PIR, 2 for #2, 3 for #3, 4 for 1 and 2, 5 for 1 and 3, 6 for 2 and 3, and 7 for all sensors tripped). If you decide to use Pin 1 for other purposes, you can do so but with the LED in-circuit it can be tricky. For example, the internal pullup resistor, if enabled, is too weak. You may use a fairly low value external pullup resistor like in the hundreds of ohms if you decide to use the pin for sensors.
 
Pin 1, which has the onboard red LED, is used as an indicator on which sensors are tripped. When the alarm is set (no alarms tripped), the LED does not blink. It blinks from 1 to 7 depending when sensors are tripped (1 for #1/PIR, 2 for #2, 3 for #3, 4 for 1 and 2, 5 for 1 and 3, 6 for 2 and 3, and 7 for all sensors tripped). If you decide to use Pin 1 for other purposes, you can do so but with the LED in-circuit it can be tricky. For example, the internal pullup resistor, if enabled, is too weak. You may use a fairly low value external pullup resistor like in the hundreds of ohms if you decide to use the pin for sensors.
29 917

modifications

Menu de navigation