Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

jkrarup

Member Since 14 Nov 2012
Offline Last Active Apr 02 2017 03:29 AM
-----

#42915 small door sensor

Posted by jkrarup on 07 January 2013 - 05:03 PM

Seems fairly basic. Do you have the expertise to wire and connect the door sensor, reset switch and LED's to the netduino board?

 

 

Logic is as follows:

Define the sensor, LED and reset switch.

Define a status for the LED as a boolean type (true=on, false=off)

Set the LED status to false to begin

create a endless loop

inside the loop check for the condition of the door sensor and it it is open set the LED status to true

also inside the loop check for the reset switch and if pressed set the LED status to false

finally inside the loop set the LED to the LED status (turn on or off the LED)

 

In the "how to's" of the project page, the "pushing the button" gives you a head start on the programming. http://netduino.com/projects/

 

Hope that helps.




home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.