Questions tagged [johnny-five]

Firmata based JavaScript Arduino Framework

Johnny-Five is an Open Source, JavaScript Arduino programming framework, developed at Bocoup.

107 questions
2
votes
1 answer

firmatajs, multiple Arduinos give timeout (johnny-five, cylonjs)

I have two Arduino unos flashed with the standard StandardFirmata and i'm trying the multi board demo with a simple node project (johnny-five npm package). Both arduinos work when I try them separately. with the following code: var five =…
Stijn Heylen
  • 183
  • 4
  • 21
1
vote
0 answers

Error: Cannot find module 'serialport' Johnny-five node package

My code is this const { Board, Led } = require("johnny-five"); const board = new Board(); board.on("ready", () =\> { // Create an Led on pin 13 const led = new Led(13); // Blink every half second led.blink(500); }); And the error I'm getting is…
1
vote
1 answer

Mocha: How to assert after an event?

I'm working with Electron and Johnny-Five to process some data I read with my Arduino Mega 2560 and I'm having some trouble testing my Arduino's connection. This is the method I want to test (ignore the awful signature): export let board: Board |…
Lucas S. G.
  • 190
  • 1
  • 4
  • 16
1
vote
0 answers

How do I fix johnny 5 installation error?

I'm trying to install johnny-five on windows7 64 bit. I have an earlier version of Node (v.13.14.0-64) installed and I use Visual Studio Code as my code editor. Regarding the first part of the error, prebuild-install WARN install No prebuilt…
1
vote
0 answers

Johnny-Five - How to catch exceptions and prevent Node program to crash?

I have a simple NodeJS program that uses johnny-five package to connect on 3 boards. Object.keys(arduinosByKey).forEach(key => { const arduino = arduinosByKey[key] const board = new five.Board({ port: new etherPort(arduino.port) }) …
Alexandre Thebaldi
  • 4,546
  • 6
  • 41
  • 55
1
vote
1 answer

Drawing a canvas line based on variables

I'm working with Arduino and I'm using an Accelerometer. I want to make a 2D line based on the x and y variables from the accelerometer. I'm trying to it with this code: board.on("ready", () => { const accelerometer = new Accelerometer({ …
Sven Z
  • 183
  • 1
  • 10
1
vote
1 answer

Accessing changing variables won't work (Johnny-Five Joystick)

I'm working on an Arduino game with a joystick. I have 4 LED lights and every 2 seconds, 1 of them will light up. With the joystick, you have to react as fast as possible to turn off the LED light. So for example, if the left LED is lighting up, you…
Sven Z
  • 183
  • 1
  • 10
1
vote
1 answer

Getting a strange error with Johnny-five motors

I'm trying to get a motor to work with Johhny-five. I'm using an arduino and I copied the code and the wiring (mostly) from their website. The only thing I changed in the wiring was instead of using a diode to make sure 5V doesn't go into the…
1
vote
0 answers

How to set up a blockwatcher on arduino nano by web3 & node.js

I cannot connect my node.js client to a test network for displaying the current blockheader on my Arduino nano. For the subscription I'm using Infura as service provider. Before I was using a websocket connection, but I had no idea how to use a…
Ndrslmpk
  • 125
  • 9
1
vote
1 answer

Johnny-Five Unable to Connect to Arduino

Windows 10, Arduino Micro. I was originally using the standard "Blink.js" tutorial, but Johnny-Five kept connecting to the wrong serial port. I hard-coded my COM port (port 8, in this case), and got past the initial error, but a new one has stopped…
Noah Tatko
  • 476
  • 5
  • 16
1
vote
1 answer

johnny-five library is not getting detected by npm

I tried installing Johnny-five library as specified in the website. After installation while running the code i am getting error as below, please help. While installing Johnny-five package I got a message such as package-lock.json need to be…
Lakshmi
  • 66
  • 4
1
vote
1 answer

Problems connecting to nodemcu via johnny-five

I'm really having trouble connecting to my ESP8266. I was working with this setup for long time now and I didn't have to flash my boards. Now after having to use a different wifi i needed to flash the board. After doing the following Updating to…
relief.melone
  • 3,042
  • 1
  • 28
  • 57
1
vote
0 answers

Johnny Five - Circuit Playground: Button 4 and Sound Sensor don't work simultaneously

I've been trying to get all of Adafruit Circuit Playground's sensors to work with the Johnny-Five node.js library and Firmata. However, when I try using its sound sensor, Button 4 stops responding. That is, in every code snippet I make, whenver I…
1
vote
0 answers

How to Take Input Data from Arduino to HTML and Log File?

I have found a code to make output data from HTML to Arduino by using Johnny Five. Now, I need your help to explain, how to take and save input data from Arduino to HTML and Log file (it could be plain text, xml, or another type). So that, i can…
JeJe
  • 55
  • 1
  • 7
1
vote
1 answer

Johny-Five Board not ready

i got a problem with the initialition of the board from johnny-five i got an arduino with the StandardFirmata on it (i also tried StandardFirmataPlus). var board = new five.board() works correct when i try it on a mac, it finds the right port and…
fuchsmate
  • 21
  • 2