Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Donovan Buck
@dtex
Oh wait… looking more closely at your screenshot, you’re using a NodeMCU. Is that correct?
Thành Nguyễn
@nguyentienthanhcv_gitlab
yes
@dtex it's correct
Donovan Buck
@dtex
Ah, okay. You need a special version of firmata and there are some other configuration issues. I haven’t used a NodeMCU, but the instructions should get you going: https://boneskull.com/how-to-use-an-esp8266-with-johnny-five/
The post you shared is for an Arduino Uno or Mega
Thành Nguyễn
@nguyentienthanhcv_gitlab
Screenshot from 2019-04-23 22-38-27.png
@dtex I did follow but I did not see as a guide
Donovan Buck
@dtex
Let’s see if someone else shows up to help. I’m not an expert on the ESP8266
Thành Nguyễn
@nguyentienthanhcv_gitlab
now I want to turn on and off the led, DHT11 humidity sensor displays humidity temperature chart through nodejs sever.
@dtex now I want to turn on and off the led, DHT11 humidity sensor displays humidity temperature chart through nodejs sever.
Donovan Buck
@dtex
@nguyentienthanhcv_gitlab SO it doesn’t look like any NodeMCU experts have arrived. Based on your last message it sounds like you are connecting but you are want to read from a DHT11 and toggle an LED based on that? Are you having a specific problem?
Luis Montes
@monteslu
whoa, getting messages 4 months late. guess I've been off of gitter for a bit. sorry about that, @rwaldron
the firmata chanes are excellent btw
Jean-Philippe Côté
@djipco
Hello guys! I have an issue that I can't seem to wrap my head around. I have 4 buttons connected to an Arduino Uno clone (CH34x driver). On macOS, everything works as expected. On Windows, however, only two of the buttons work normally. Here's the code I'm using:
let buttons = new five.Buttons([
  { pin: 3, isPullup: true },
  { pin: 5, isPullup: true },
  { pin: 8, isPullup: true },
  { pin: 10, isPullup: true }
]);

buttons.on("press", e => console.log(e.pin));
image.png
Buttons on pins 8 and 10 do nothing. Am I missing something obvious?
Jean-Philippe Côté
@djipco
I just tried with a genuine Arduino Uno and I got the same problem.
Donovan Buck
@dtex
That’s seriously weird. Do you have the A/C adaptor for the Uno? The OS shouldn’t matter so I’m wondering if it might be an issue with power off the USB port.
Donovan Buck
@dtex
Also, I think you need a 10k resistor between ground and the buttons to be safe.
Jean-Philippe Côté
@djipco
I have not tried it with the adaptor. I figured since buttons do not draw any power I wouldn't need it. I will give it a try.
I'll also try the resistor. I thought that it wasn't needed when using the pull up resistors...
I should probably mention that I'm running this via NW.js. There might be something funky at that level. I don't know.
Donovan Buck
@dtex
I thought that it wasn't needed when using the pull up resistors
You’re probably right. I was trying to find a wiring diagram for that specific case but no luck.

I'm running this via NW.js

That could be it, but I still don’t quite see how. If it works on pins 3 and 5 I see no reason why that wouldn’t work on pins 8 and 10.

Sorry, not much help I know.
Zhairgling
@Zhairgling
Hello, someone has already had experience with imu (for me the BNO055) and StandardFirmataWifi?
The onchange (..) and ondata (..) event we seem not to be triggered.
Is it a problem of timing?
I specify that my connection works well with the lib of adadafruit and the arduino ide by usb serial
By the way I'm using a esp8266
Zhairgling
@Zhairgling
I think that the BNO055 is broken he is keeping crashing my others devices on my board
Zhairgling
@Zhairgling
WIN_20190507_10_55_52_Pro.jpg
Jean-Philippe Côté
@djipco
@dtex I'm following up on my problem from May 10. I tried your suggestions and they didn't work. However, I discovered that if I use an external powered USB2.0 hub to connect my Arduino clone, the problem goes away. I have no idea why. The port on my (old) computer is USB2.0. It is as though the hub provides more (or more regular) power to the Arduino. Ideas?
Donovan Buck
@dtex
It makes sense. The current draw is more than the port on your computer can handle. The powered hub can supply more.
nelson
@nelsoniseru
What differs in standard firmata and johnny-five
Zhairgling
@Zhairgling
johnny-five use firmata
@nelsoniseru J5 is an API layer over firmata
Artem Arshanyi
@arshaniy108_twitter

Hi Guys!!
I try to manage 12 servos.
something like that:

var servos = new five.Servos([9, 10]);

servos[0].to(180)
servos[1].to(0)
servos[0].to(0)
servos[1].to(180)

And it looks like something goes wrong, maybe i missed some lib or something like that?
Because it is doesn`t work asynchronous like in C !

Donovan Buck
@dtex
@arshaniy108_twitter It is asynchronous. These calls to to() are non-blocking so there is effectively no time between them and the second call on each servo “wins". There are a couple of ways around this:
Option 1:
const five = require("johnny-five");
const board = new five.Board();

board.on("ready", function() {

  const servo = new five.Servos(9);

  // Take 1000ms to move to 180
  servo.to(180, 1000);

  // Wait 1000ms and then move to 0
  setTimeout(function() {
    servo.to(0);
  },1000)

});
Donovan Buck
@dtex
Or check out the Animation class:
Option 2:
var five = require("johnny-five");
var board = new five.Board();

board.on("ready", function() {
  var servo = new five.Servo(9);
  var animation = new five.Animation(servo);

  // Create an animation segment object
  animation.enqueue({
    duration: 2000,
    cuePoints: [0, 0.5, 1.0],
    keyFrames: [ {degrees: 0}, {degrees: 180}, {degrees: 0}]
  });
});
Jean-Philippe Côté
@djipco
@dtex What does not make sense is that it doesn't work when I use a power supply for the Arduino.
Artem Arshanyi
@arshaniy108_twitter
@dtex Thanks man!
However I had issue with my shield on arduino, without it and with your examples everything works as I need:)
Doğukan Arat
@dogukanarat
Hello, I just want learn if johnny-five is eligible for drone application. I want to be sure about the fact that the delay would not be a problem.
Bryan Hughes
@nebrius
@dogukanarat can you explain a little more what you'd like to do with Johny-Five on the drone? Delay may or may not be a factor depending on the details
Bader Youssef
@CrackTheCode016
hi!
If I'm understanding correctly, johnny-five can utilize other third party npm packages correct?
i.e, I can do npm install my-package and require that in my johnny-five script? What are the limitations here?
Donovan Buck
@dtex
Yes, Johnny-Five plays nice with other packages. The only exception might be if you are trying to use another package that establishes it’s own connection to the hardware.
Arye Shalev
@pantchox
Hi guys, who ever has a blog or post on Medium stuff that are related to programming, I am working on a new publishing platform, its my side project and i worked reallllly hard on it - I would love for your feedback! if you love publishing and curating content - PLEASE PM ME :) thanks!
if my message is not following chat room rules i will delete it! thanks.