I would like to send commands over to my espruino via serial.
I think this is the way:
echo 'digitalWrite(LED1, 1) < /dev/tty.usbmodem1421
However, it doesn't do anything. My terminal shows me no feedback whatsoever, even if I press enter or ctrl+c.
Am I doing something wrong?
I have to do it over serial; I can't have my board connected with a prompt always on because I have this home automation project for my dorm and I would like to send serial commands wirelessly with bluetooth, and the espruino's going to be stuck somewhere on the wall.
Something like that should work, but you do have a missing end quote in that code and the wrong arrow...
I just tried:
echo "LED1.reset()" > /dev/ttyACM0
and that works great on Linux (and should do on mac if you change the /dev/tty... path.
This might help you? https://www.espruino.com/Interfacing
Also this one: https://www.espruino.com/Pico+CPU+Monitor
And one more thing - there is a command-line app to do some other simple things for you too: https://www.npmjs.com/package/espruino
But if all you want to do is send commands, the echo is probably best :)
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem