thingsSDK / thingssdk-cli

Generator for JavaScript microcontroller projects
MIT License
39 stars 9 forks source link

Repl with 2 connected devices appears to be dropping characters #29

Closed dustinbrownman closed 7 years ago

dustinbrownman commented 8 years ago

I connected 2 devices (Feather HUZZAH & ___). I was able to push the "hello world" code to both (yay!), but when I tried the Repl, I had some issues. I put in a few simple commands and here's what happened:

>1+1    
=11
>1 + 1                                                              
=1
>digitalRead(D2)
espruino:  
Uncaught ReferenceError: "taRa" is not defined

It appears to be randomly dropping characters. I'm guessing it's an issue with trying to split the code between two devices, but honestly, I have no clue.

chalkers commented 8 years ago

Any ideas @craigsdennis?

craigsdennis commented 8 years ago

taRa is in digitalRead.....I'm assuming both subprocesses are listening.

No idea on what to do here...

Suggestion some hotkey combination that flips between the different running REPLs, that is assuming this is a use case. Should we change it to a feature?

Problem exists when there are multiple devices in devices.json

michapixel commented 7 years ago

I do see that even with just one board (mine is a 12e) connected. Sometimes it randomly drops characters, sometimes the "espruino"-part is missing.

I have no clue about what's causing this, just wanted to throw in, what i am seeing: This is on the latest Espruino-build (1.91)

$ npm run repl                                    

> wifiworld@0.0.0 repl E:\ESP8622\Code\wifiworld  
> node ./scripts/repl                             

Connecting REPL...                                
espruino:  Espruino Command-line Tool 0.0.23      
-----------------------------------               

espruino:  Connecting to 'COM3'                   
espruino:  Connected                              
digitalRead(D4)                                   
Uncaught ReferenceError: "D" is not defined       
 at line 1 col 13                                 
digitalRead(D)                                    

WAT? I tried some more:

>digitalRead(D2)
=1
>digitalRead(D5)
=1
>digitalRead(D4)
=1

what is going on here?

chalkers commented 7 years ago

This should be in the espruino-strategy. Filed under 10