Hi! I am controlling some lights with an javascript johnny-five app and i switched from using old TIP120's to using a relay. However the transistors use an active HIGH and the relay use an active LOW to activate
PaulS:
Is there some part of POST YOUR CODE HERE that is too hard for you to understand? Posting it somewhere else is NOT what you were asked to do.
Relax man its my first post. He asked not to having to download it so i pasted it in instead
board = new five.Board({ port: "COM5" });
board.on('ready', function () {
// Counting down pins because that's the orientation
// that my Arduino happens to be in
pump0 = new five.Relay({
pin: 2,
type: "NC",
isOn: true,
but clearly you didn't because you didn't use code tags when you posted your code:
When you post your code put it between
...
tags. You can do that by hitting the </> button above the posting area.
Also, when you post a URL, use the chain links button on the toolbar to make it clickable. Like this:
This will make it easier for people to help you with your question.
My advice is to avoid that johnny-five garbage. They're trying to teach electronics when they don't understand the most basic concepts(from JavaScript Robotics: Motor with Johnny-Five):