How to send projects to Espruino CMD?

Posted on
  • I got Espruino_cmd running on my Linux system.
    Now, how do I connect to it with WebIDE or at least how do I send projects (with modules) into it, the same way WebIDE does to a connected microcontroller?

  • Espruino_cmd? Do you mean https://www.npmjs.com/package/espruino?

    If so, there are a bunch of examples on that webpage:

    # Connect to Espruno and act as a terminal app  (IF Espruino is the only serial port reported)
    espruino
     
    # Connect to Espruino on the specified port, act as a terminal
    espruino -p /dev/ttyACM0
     
    # Write a program to Espruino (IF Espruino is the only serial port reported)
    espruino myprogram.js
     
    # Otherwise you'll want to specify the exact port first
    espruino -p /dev/ttyACM0 myprogram.js
     
    # Write a program to Espruino and drop into a terminal, but then monitor
    # myprogram.js for changes and upload it again
    espruino --watch myprogram.js
     
    # Load a file into two Espruino boards
    espruino -p /dev/ttyACM1 /dev/ttyACM2 mycode.js
     
    # Load a file into Espruino and save
    espruino -p /dev/ttyACM0 mycode.js -e "save()"
     
    # Execute a single command on the default serial device
    espruino -e "digitalWrite(LED1,1);"
    
  • Hi @Gordon

    I didn't know how to call the Espruino interpreter, but I saw in some GIT talking you guys refering to it as espruino_cmd to differentiate from espruino tools, so I shoot it. :)

    @Wilberforce already pointed me to how:

    Start the interpreter:

    espruino --telnet
    

    In the WebIDE:

    Settings->COMMUNICATIONS
    Connect over TCP Address
    [ your.ip:2323 ]

    Simple like that! But if it is there in the docs, I overlooked it.

    Thank you.

  • What board are you running Espruino on then?

  • In this case I have compiled it and I'm running the Espruino interpreter (https://github.com/espruino/Espruino.git­) in my Ubuntu 16.04 Linux system.

    I'm needing to use it to test my code using the "fs" module, because the Espruino firmware for my cheap NodeMCU-12E hardware doesn't come with this module builtin (not sure why).

    • In the Readme.md for this Espruino GIT repository would be a good place to explain how to connect the Web IDE to it after you got it compiled and running. I may do a pull request with it if you agree.
    • But I learned how to get it compiled from [this doc], so not sure where is a better place.
  • Ok - moving this out of the 'Official Espruino Boards' forum then. This is why I have a whole section for other boards - see http://forum.espruino.com/conversations/­301440/

    There's no 'fs' module for ESP8266 because there isn't enough free flash memory on the chip in the current configuration.

    If you want to write some information on using the Linux version you could write a Linux.md here: https://github.com/espruino/EspruinoDocs­/tree/master/boards

    Then it'll appear on the Espruino website. Generally if you're using the normal build, you can just type --help to get some help though. It'll even load modules off the local disk without needing the IDE.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

How to send projects to Espruino CMD?

Posted by Avatar for EthraZa @EthraZa

Actions