Difference between revisions of "Anti-Theft Alarm"
(→Programming Thought) |
|||
(One intermediate revision by the same user not shown) | |||
Line 38: | Line 38: | ||
==Module Setup== | ==Module Setup== | ||
− | + | ==Setup== | |
[[File:anywhere_steal-step.jpg|600px|center]] | [[File:anywhere_steal-step.jpg|600px|center]] | ||
*Assemble the modules and sensors: | *Assemble the modules and sensors: | ||
Line 59: | Line 59: | ||
===Programming Thought=== | ===Programming Thought=== | ||
− | *Declare a variable "on" to store the state of the switch. You can set open and | + | *Declare a variable "on" to store the state of the switch. You can set open and closed two states of the switch with touch button 2. |
**on=0 represents open; | **on=0 represents open; | ||
**on=1 represents closed at night. If there is someone rushing into the museum, the value of on will change into 2; | **on=1 represents closed at night. If there is someone rushing into the museum, the value of on will change into 2; |
Latest revision as of 06:21, 19 October 2016
ContentsOutlineMake a simple anti-theft alarm system, controlling the system to start with a touch button.
Module BillModule
Other Equipment
Module SetupSetup
ProgrammingRequired Program Blocks
Programming Thought
Programming1. Color LED prepares, and declare variables.
2. Press the touch button 2 to change the state of the switch.
3. If on=0, open in the daytime, and the color LED will change into green.
4. If on=1, closed at night, the color LED will change into red.
5. If on=2, someone has rushed into the house, flash and alarm and then close.
Technical Specification
Related CasesFAQ |