-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
esp32/UNO with 3.0.0, use J5 or Firmata.js still timeout on "ready" connection. #139
Comments
For me i could not make J5 work for any arduino or arduino compatible board. I dont know why https://github.com/ntruchsess/perl-firmata/tree/master/examples |
@ale-novo It seems some change in the latest version has broken the js library. See rwaldron/johnny-five#1817 |
I used UNO board install ConfigurableFirmata 3.0, still not working. It looks like ConfigurableFirmata has issues with j5 or Firmata.js. |
@awong1900 Check the baudrate that is used. The default baudrate for ConfigurableFirmata 3.0 is now 115200. |
Yes, I carefully checked the baud rate. I think i found true reason on UNO. Make initFirmata(); // Change the initialization order.
initTransport(); Becase we need firstly set the firmware version, then |
But still not work on ESP32, it stop on |
ive tested J5 like 1 year ago and i was running ConfigurableFirmata v2.10, and like i said i had no luck for it to connect with several boards. Dont know why and i ditched it. |
Thank you for your advise. I'm looking inside the code, trying to print some debug info. I have solved the connection problem between UNO ConfigurableFirmata v3.0.0 and J5. Now looking at why this didn't work on ESP32. |
I use line 92 instead of line 91. The firmata.js/example/blink.ino work fine on esp32. So i think the code line 91 not work on esp32 board. @pgrawehr |
Like the last comment modified var SerialPort = require("serialport");
var five = require("johnny-five");
const port = new SerialPort("/dev/tty.wchusbserial14310", {
baudRate: 115200,
});
var board = new five.Board({ port: port });
board.on("ready", () => {
// Create an Led on pin 13
const led = new five.Led(2);
// Blink every half second
led.blink(500);
}); |
You should not be modifying the Analog input cpp i can connect successfully to ESP32 and run the capability query with perl-firmata w/o any mods and works fine. i believe J5 is not compatible with ConfigurableFirmata, but only with StandardFirmata, and that may be the reason why it was not connecting for me and/or failing for you. There is a Difference between ConfigurableFirmata and StandardFirmata. For ConfigurableFirmata: and then launch the j5 example, for instance if it does not work try perl-firmata for me with perl-firmata and ESP32 , the capability query works fine and report analog pins, however i noticed a problem only for ESP32 where it reports initially the analog value but then freezes, ie it does not update again despite being in a loop. |
OK, I'm sure you can use perl-firmata to complete the connection. You have do great test. |
Now, it is our biggest problem. |
let me know if you fix it |
@awong1900 Can you describe exactly what steps you're executing to freeze the ESP32? I'm not sure I'm following the scenario you have a problem with. |
for me i can describe what ive seen. i was thinking on creating a new issue since its not related with this 'connection' issue. For me ESP32 analog input works, however the analog value freezes with the initial value. lets say you connect your esp32 using firmata to a client, and query your analog pin. the pin maybe reports a value of 255 (0-1024), then if you move pot the analog pin still reports 255 other boards when you move your pot they report the right value for the new pot position. hope its clear |
@ale-novo Yes, please open a separate issue on this. I noticed that I never tested analog input on ESP32, and I can reproduce that it isn't working as expected. I'm investigating. |
I will make a new issue . #145 |
I use esp32 with ConfigurableFirmata 3.0.0. The firmware use
ConfigurableFirmata.ino
. Success flash to esp32, and outputThen i test it with J5 and Firmata.js, like this
Output:
Firmata.js code:
Output:
The esp32 chip info:
It looks like the ready communication is not complete. Any suggestions would be appreciated.
The text was updated successfully, but these errors were encountered: