Yes, with the correct tools you could recover Python source code from the brain.
yes, Python source is “compiled” to byte code by the interpreter before it runs (to improve execution speed).
python code is compiled on the brain
1 Like
Noto Sans (various different parts). But we don’t use them directly, they had to be rasterized and compressed.
the font the v5 brain uses
2 Likes
whoa, a scavenger hunt for vex? havnt seen one of these in a while! why dont we bring one to states and or worlds this year?
1 Like
It mainly has been just me posting in this thread for a while, the original scavenger hunt got locked with all the other meme threads when Vex removed a lot of posts.
6 Likes
Pi_way
September 19, 2023, 2:41am
27
A vex::task object does not have to be a function reference:
yea, you have to use a static member function as a callback for tasks (and threads). However, you can pass the current class instance as a parameter to the callback and use that to do instance specific things. Here’s a simple example.
/*----------------------------------------------------------------------------*/
/* */
/* Module: main.cpp */
/* Author: …
There is …probably…? a hook in Python, which will yield to the brain’s task scheduler each loop iteration. (calling wait(20, MILLESECONDS) is not strictly required in Python).
Just use sleep (or wait, same thing), wait(1, MSEC) is the closest you can get, there is no binding for yield.
You may also find that just having no delay (sleep etc.) in the loop works, I think I have a hook that calls yield for each loop iteration so python doesn’t ever block the scheduler.
but yield is rarely needed even in C++ code, what’s the actual use case ?
Connecting 2 cortex brains:
Summary
The code linked at the end of this post allows two cortex controllers to be connected using their UART ports. The master cortex (with VEXnet and joystick) controls the slave cortex (no VEXnet) using the example communications protocol.
**Background
**
I’ve posted about serial communications before in the ROBOTC programming tips thread , however, I wanted to show an example that was a little more developed with bi-directional communication between two devices.
For some of the product…
4 Likes