khanning / scratch-arduino-extension

Javascript extension to connect Scratch 2.0 with Arduino using Firmata
83 stars 91 forks source link

Still showing Arduino disconnected (Mac + Firefox) #70

Open drlines opened 6 years ago

drlines commented 6 years ago

Hi,

I have done all of the steps for the install of both the Arduino app and the Firefox plugin.

I've installed the Arduino app and tested it with a connected Arduino Uno R3. Used some of the example code, like blink, etc.

Updated the StandardFirmata to the latest version.

Installed Firefox 49.0.2 and the Scratch Web Editor plugin as per Issue 55 (https://github.com/khanning/scratch-arduino-extension/issues/55) because I used the latest version of FF and couldn't get it running.

Then did the install of the scratch plugin from the ScratchX instructions and ran the plugin. Ensured that the plugin was not blocked and selected "Allow and Remember".

I can't seem to get it working beyond showing the "Disconnected" yellow light . I've tried with both Arduino app and FF open at the same time as well as separately. Can someone help?

PC: Mac OS High Sierra 10.13.2 Firefox 49.0.2

samkass commented 5 years ago

There appears to be a bug in the extension. The extension tries to set the set_receive_handler before the connection has been initialized. It should be setting it in the callback of the open call. However, when I fixed that bug on my local version I just ran into another one where it kept repeatedly disconnecting and reconnecting.