johnny-five

Johnny-Five, I2C, Controlling multiple temperature sensors using ESP8266

血红的双手。 提交于 2019-12-13 05:23:54
问题 I'm trying figure out how to control multiple temperature sensors. THE SETUP: 2 ESP8266 Micro Controllers 2 MCP9808 Temperature Sensors 1 Machine controlling both ESPs using Johnny-Five. NOTE: Each ESP8266 micro controller handles one MCP9808 Temperature Sensor. THE GOAL: The central machine (MacOS running Johnny-Five) handles both microcontrollers under one Node JS script. THE PROBLEM: I can control one Micro Controller / Temperature pairing, but not both under the same script. Apparently

LCD not working in node.js + Arduino project

僤鯓⒐⒋嵵緔 提交于 2019-12-12 05:25:26
问题 I am following this tutorial, but I am doing a very basic version where I just want to print something out. All the pins and hardware specification are followed as per that tutorial. Below is my app.js code: var five = require('johnny-five'); var board = new five.Board(); var lcd; board.on('ready', function() { lcd = new five.LCD({ // LCD pin name RS EN DB4 DB5 DB6 DB7 // Arduino pin # 12, 11, 5, 4, 3, 2 pins: [12, 11, 5, 4, 3, 2], rows: 2, cols: 16 }); lcd.clear().print("Hello NJ"); this

Open file in another folder with node js

孤街醉人 提交于 2019-12-12 03:47:31
问题 I am trying to open a file on another folder with nodejs using an absolute path. This file contains a js program that has to be executed the node. I am using johnny five to program an Arduino but the file is not in the same folder as the node files and the libraries. How can this be done? 回答1: require('C:\\run.js') This will get 'run.js' file from C disk. But if you already tried this, than please can you explain in more detail what you want to do? 来源: https://stackoverflow.com/questions