Невозможно использовать esp8266 через порт USB - PullRequest
0 голосов
/ 21 июня 2019

Я пытаюсь запустить simble led blink на esp8266 через usb в Windows 8.1 и Node.js, используя модуль johnny-Five.

Я следовал этому уроку https://boneskull.com/how-to-use-an-esp8266-with-johnny-five/ и смог выполнить необходимое задание через соединение Wi-Fi.

Этот код работает после загрузки примера StandardFirmataWifi из Arduino IDE:

const { EtherPortClient } = require('etherport-client');
const five = require('johnny-five');

const board = new five.Board({
    port: new EtherPortClient({
        host: '192.168.1.113',
        port: 3030
    })
});

board.on('ready', () => {
    var led = new five.Led(2);

    // "blink" the led in 500ms
    // on-off phase periods
    led.blink(500);
});

Но, когда я пытаюсь запустить тот же код с USB-соединением вместо Wi-Fi, используя этот код:

const { EtherPortClient } = require('etherport-client');
const five = require('johnny-five');

const board = new five.Board();

board.on('ready', () => {
    var led = new five.Led(2);

    // "blink" the led in 500ms
    // on-off phase periods
    led.blink(500);
});

Выводит следующую ошибку:

Please check that you've properly flashed the board with the correct firmware.
See: https://github.com/rwaldron/johnny-five/wiki/Getting-Started#trouble-shooti
ng

If connecting to a Leonardo or Leonardo clone, press the 'Reset' button on the b
oard, wait approximately 11 seconds for complete reset, then run your program ag
ain.

PS: когда я загружаю эскиз из IDE Arduino через usb, он отлично работает, поэтому я думаю, что проблема в некоторой конфигурации узла.

Заранее спасибо за любую помощь!

...