Using PICO from the Command Prompt #4787
Replies: 1 comment
-
Posted at 2019-06-27 by Robin Thr 2019.06.27 Hello @Skog,
This would be normal, as the only way the Pico is able to communicate with the WebIDE is via the attached USB cable. Not entirely sure what the intent is, but the function echo() has one parameter and takes an argument of T or F
A call to a function in Espruino will return 'undefined' (or the intended return value of that function) unless other content you provide in a wrapper function you create is set:
By chance is the intent to have something show up in the WebIDE after the LED is intentionally turned on? This tutorial example should assist in laying out the code:
EDIT: It just dawned on me, as there isn't a mode() function in Espruino, that an attempt to pass DOS command line instructions is being used. Again, please explain the intent. Some posted code would assist here also. Posted at 2019-06-27 by @allObjects @Skog, if you have a background process in your background window going that captures the input from same com port and pipes it to your command prompt window, you should be able to see the response. I'm not that much a win user anymore, but it is not much different as in linux/osx/... Posted at 2019-06-27 by Wilberforce Use the programme Or use the web ide. Why do you want to write directly to the com port? Posted at 2019-06-27 by Skog the DOS pass command is where the problem lays. My echo inside the IDE is working fine. However I can not see anything from the Espruino with Command Prompt - i can only call the command (one way) @wilberforce, it frees up access to talk with other devices. Posted at 2019-06-28 by @gfwilliams @robin, @Skog is trying to do this: http://www.espruino.com/Interfacing#windows @Skog what you're doing looks good to me, however the command:
Isn't going to receive anything from the board - the As @allObjects says, in Linux/Mac you generally have another process running that's piping from the COM port in the background, but I'm not sure how that works in Windows. Ok, I just googled it. Not tried it but there's a bunch of stuff out there as this is something people often do with Arduino by the look of it: So:
Will pipe the data to a file until the Pico sends a Ctrl-Z character ( Or I believe:
May work for a single line. However you may end up just getting the end of the line that is the command, as Espruino will echo back the command that is sent to it unless Also it's worth checking your To be honest past a certain point you may find it's easier/more reliable to use a Python script to get your data and to then call that from the command prompt: http://www.espruino.com/Interfacing#python-multiplatform- Posted at 2019-06-28 by Skog the > of the code simply sends the command. I switched it to = and found i received an echo - only it was inside the VT - it did not get its info from the device. --btw 96 is an abbreviated condition for 9600 bps, however your observation about it being a USB could be correct because the rate can be anything for sending the command. So i wonder if the VT has to be configured for a USB? Is there away to make it trainable to work with Espruino? I will probably avoid using Python and stay with the straight forward VT/or/VS Posted at 2019-06-28 by @gfwilliams Can you try sending the command Honestly at this point it sounds like you know more than me about it - I'm not sure there's much I can add really. I'd doubt there is much difference between USB and standard COM ports though. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2019-06-27 by Skog
So it seems i was able to send a command to the Pico from the Command Prompt in Windows 10. However the echo response does not occur. So the command is able to execute fine and it appears, however without a functioning echo, the return equations are not visible, only the hardware that has adjusted from the command
here is what i have so far:
this does in fact turn on LED 2. however i get no response to the prompt. If i change the command to 1+3
i dont see the =4 until i attach the device to the WEB IDE
i have also used:
to set the baud rate. which after i can confirm with
that is correct
Beta Was this translation helpful? Give feedback.
All reactions