Does the VEX Python environment for the V5 have a serial API to allow generic RS485 communication over the smart ports?
IIRC you just open “/dev/port1” (as an example) and then use read/write commands. I’ll look next week when I’m back in the office.
Thanks! When I go back to visit my old team I can also give it a try.
While I’m at it, is there a way to access other functions of the serial port not exposed by the filesystem API, like setting the baudrate and checking the space available in the output buffer?
Honestly while accessing it through the filesystem API is cool, there’s just more room for bugs or slight differences in behavior between implementations, so if there’s also some more basic API that more closely mimics the VEXOS API that’d be much more useful, like the one I added to PROS.
The Python API is not as comprehensive as the C/C++ API, I left the most advanced (ie. not used by 99.9% of customers) APIs as C only, not sure there is a way to set baud rate etc. I’ll look next week.
Thanks, no real rush on this. It’s not something I’m going to touch for a few weeks to months anyways, just figured I’d ask early. I presume there’s no way to call into VEXos (or a C library loaded into memory) from the Python environment you’re using?
No there isn’t.