So, I have noticed that computers use multi-coding functions. What I mean by this is that computers use C++ programs, which run Java, which run Batch, and so forth. Why can’t Robot C do this? I think that it should be able to, but I haven’t found any leads. Any help would be appreciated.
Please explain what you mean some more. ROBOTC does have the ability to run more than one thread of execution, most (but not all) embedded systems do not allow more than one “program” to be run at the same time.
What I meant was, would it be possible to load Java(or another program) onto the microcontroller using RobotC and use the RobotC Code to call the program.
Would it be possible? Yeah, sort of, but it would be kind of pointless. Why would you want to do this?
Although technically it already is C (or assembly?) which is running RobotC (RobotC actually isn’t C) so it really already is doing what you ask.
The processor is pretty week and RobotC already takes a performance hit for using this virtual machine setup, unlike EasyC, so it really wouldn’t make any sense to build more layers.
Well, at my school people learn java for computer science and AP classes, so I thought of using this as a challenge to them for them to build AI. The idea was that the AI would decide what to do in autonomous rather than user functions. Also, I had the idea of creating a virtual map of the field in either Java or RobotC. I like the object orientedness of Java, so I wanted to find a way to do it in Java.
Java is available for the STM32 arm processors but, as far as I can tell, you need a special version of the CPU that presumably has some ROM support for the Java development environment. So I doubt there’s much hope of running it on the cortex. C++ is quite feasible, I may add that to the open source code I’m (still) working on occasionally.
You’re gonna have a really rough time doing this and it probably isn’t worth the effort. Feel free to prove me wrong.
Regardless, you could implement such a system in RobotC using a 2d array and structs.