Getting started with CLI on RaspberryPi #1732
Replies: 8 comments
-
Posted at 2016-12-14 by @gfwilliams Did you also run this?
The single port that's being reported is a built-in physical serial port on the Raspberry Pi - it's not finding any Bluetooth devices - which could be because of the lack of the command above, or because bluetooth itself isn't working on the Pi When it does work, You can also run |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-14 by JamesS Gordon,
Thanks in advance |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-14 by @gfwilliams It's worth trying to run You could also run There's info covering most of what you're after on the Espruino CLI tools page I think: https://github.com/espruino/EspruinoTools You can get the battery percentage using At the moment there's nothing on the command-line to evaluate an expression and return just that, but you can easily strip it out:
However you can actually use First step is to get it connecting to your device though. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-14 by JamesS
Ah - that verbose switch was useful - that's exactly what's happening. Have tried repeating the install steps to no avail. Have tried apt-get update + upgrade. Have also tried npm rebuild.
Grateful for any advice on how I could have sorted this in an orderly way but in the meantime I seem to have fixed this after a number of npm rebuild attempts and strangely a reboot.
Now off to find out how I control which of these 2 pucks I am connecting to. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-15 by @gfwilliams Ahh ok, I guess you maybe updated node after you'd installed the espruino library. NPM updates were definitely the way to go - glad you got it sorted! All you should need now is |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-15 by JamesS Brilliant - That works - I am on a roll now and can get LEDs to come on and off at will. I also notice that, unlike bash, when sending commands from in the CLI the cursor must be at the end of the line. This may also catch others out until they realise what's happening. Thanks for getting me started - I hope this helps others on this journey too. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-15 by @gfwilliams I'll tweak the docs. It should definitely disconnect after the app has closed. Just having the process killed should really be enough to do it - so I'm not sure why you'd be having connection issues. It may just be chance - if you're still using the firmware they shipped with, they don't advertise that often and sometimes the app can have trouble finding them to connect to. The newer firmware will fix that.
Yes, this is an Espruino thing - built into the firmware. Once you get used to it it's handy for multi-line editing, but if you've come straight from bash it can feel annoying at first |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-15 by @gfwilliams Just hit 'end' to go to the end of the line, or 'page down' to go right to the end of a multi-line thing. You can also just click with the mouse |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-13 by JamesS
Hi,
I have installed espruino on Raspberry pi as per https://www.espruino.com/Raspberry+Pi+Web+IDE
If I run the CLI with --list then I can see a port.
I can also set this port on startup with
What can I do next?
James
Beta Was this translation helpful? Give feedback.
All reactions