Git Product home page Git Product logo

Comments (9)

paultag avatar paultag commented on August 24, 2024

You have to be ultra careful here. Relays generate a super strong current when the magnetic fields collapse (AWESOME, right?), so hooking them up to an Arduino directly is bad juju.

You'd usually wire them though a set of Transistors, and they'd just be Digitial output devices :)

from johnny-five.

rmurphey avatar rmurphey commented on August 24, 2024

I've done some simple circuits with relays (and transistors, as @paultag mentioned) and just used board.firmata.digitalWrite( ... ) to activate/deactivate the transistor. I'm not sure a generic relay API makes sense, but maybe if you work with the lower-level code, you can share it and it will be more apparent what a relay API might look like.

from johnny-five.

Rolilink avatar Rolilink commented on August 24, 2024

Nice, thanks for the warning @paultag , i gonna follow what @rmurphey says, wathever i code, i will let you know guys.

from johnny-five.

paultag avatar paultag commented on August 24, 2024

Sure thing. I strongly suggest either two transistors set up as a Darlington Pair, or a single package TIP112 :)

from johnny-five.

divanvisagie avatar divanvisagie commented on August 24, 2024

@rwaldron I see this was marked as a feature, Is there a plan for relays? @rmurphey has a good point here.

from johnny-five.

rwaldron avatar rwaldron commented on August 24, 2024

@divanvisagie I was just waiting for the contribution to come in ;)

from johnny-five.

divanvisagie avatar divanvisagie commented on August 24, 2024

Ill start with this when im done with within.

from johnny-five.

divanvisagie avatar divanvisagie commented on August 24, 2024

Working on it here: https://github.com/divanvisagie/johnny-five/tree/relay

from johnny-five.

rwaldron avatar rwaldron commented on August 24, 2024

Looks great so far :)

from johnny-five.

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.