Making a bash like interface in Pros

I’m trying to make a bash like terminal interface for controlling motors and reading sensors among other things. What is the best libraries to help with the creation of such an interface using the pros terminal?

Do you mean like controlling the v5 from computer, and why would you want it to be a terminal interface. Also PROS cannot control the v5 from a computer. It can only upload programs, run programs, and receive (printf or cout) data back (as far as I know).

pros has a terminal. all that it does is open a stdin and stdout to communicate over kinda like telnet. It is by directional. You can type into it and on your programs side you can read that data with cin or getline

Eh, let’s see. Typically these are written with some sort of lexer/parser framework for tokenizing input and then figuring out what to do with the tokens. You could try getting something set up with ANTLR or another tool like that, but I’ll make no guarantees that PROS has support for all the things (read: libraries, system headers, etc) those tools will need.

Your best bet will probably be to build something simple on your own-- I’m pretty sure you’ll be able to find tutorials on doing that online. We actually have an old project for the Cortex that did something similar with reading and parsing stuff from the serial input, so you might be able to get some insight by looking at how that worked.

2 Likes

Does Jinx work with V5?

no, but it’s on the roadmap. there’s an old branch with the beginnings of the implementation, but there’s a lot of work that still needs to be done on the frontend (CLI, etc).

1 Like

vexcat is making something similar. He wrote his own serial API, and it is super cool.

3 Likes

I’m going to write a basic interface between the brain and a raspberry pi that I mounted on my robot. Because I’m not much of a C++ dev. I’m more of a python dev. the main purpose of this was to get real time data from the motors to debug them. P. S. I know that I can’t use this for competition it’s just for testing and diagnostics.