Giter VIP home page Giter VIP logo

Comments (4)

jrich523 avatar jrich523 commented on August 25, 2024

just noticed my relays dont have a power light, which, doesnt make much sense, but hopefully thats my problem! will update soon

from st_anything.

ogiewon avatar ogiewon commented on August 25, 2024

Sounds like your well on your way to debugging the circuit already. Just in case, here is a pretty decent tutorial on wiring a relay up to an Arduino.

http://howtomechatronics.com/tutorials/arduino/control-high-voltage-devices-arduino-relay-tutorial/

Please note that some relays are "Active Low" and others are "Active High". Depending on which one you have, you may have to make a small edit to the Arduino Sketch. Take a look at the ST_Anything source code for the IS_DoorControl. At the top of the .h and .cpp files are the instructions for proper use of the device (attached below for quick reference.) The last three parameters are really what drives the relay behavior. Best to make sure these are set in a manner that keeps your garage door from opening or closing after a power blip to the Arduino. We don't want any inadvertent state changes in the middle of the night! I always power cycle my Arduino to make sure no undesired behavior occurs upon loss or restoration of power. Safety 1st! And Secruity a very close 2nd!

//			  Create an instance of this class in your sketch's global variable section
//			  For Example:  st::IS_DoorControl sensor3("doorControl1", PIN_CONTACT_DOOR_1, LOW, true, PIN_RELAY_DOOR_1, LOW, true, 1000);
//
//			  st::IS_DoorControl() constructor requires the following arguments
//				- String &name - REQUIRED - the name of the object - must match the Groovy ST_Anything DeviceType tile name
//				- byte pinInput - REQUIRED - the Arduino Pin to be used as a digital input
//				- bool iState - REQUIRED - LOW or HIGH - determines which value indicates the interrupt is true
//				- bool internalPullup - REQUIRED - true == INTERNAL_PULLUP
//				- byte pinOutput - REQUIRED - the Arduino Pin to be used as a digital output
//				- bool startingState - REQUIRED - the value desired for the initial state of the switch.  LOW = "off", HIGH = "on"
//				- bool invertLogic - REQUIRED - determines whether the Arduino Digital Output should use inverted logic
//				- long delayTime - REQUIRED - the number of milliseconds to keep the output on

from st_anything.

ogiewon avatar ogiewon commented on August 25, 2024

Also, just saw your "button wiring" question... You simply need to connect Arduino GND to Pin 6 or Pin 8 to change the state of the door from Open to Closed. These are designed to be routed through a typical magnetic door sensor (reed switch). Something similar to these http://a.co/21J7Axk

from st_anything.

ogiewon avatar ogiewon commented on August 25, 2024

Closing for now due to lack of activity. If you still have any questions, feel free to comment here and we can re-open the issue.

from st_anything.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.