Robot-Config files?

I was trying to code today (switching over from Robot Mesh to Vexcode text) and I wanted some help understanding the difference between the two config files Robot-Config.cpp and Robot-Config.h , any help is appreciated, sorry for simple question.

The cpp file is for the actual declarations of the devices, the h file contains all of the backend work so that everything in the cpp file works inside all of the other files.

Important to note if you edit the cpp file yourself you’ll need to add whatever devices you changed to the h file

1 Like

Thanks, do I just input them the same way I do in the cpp?

No. You’ll see a pattern when you open the .h file. The syntax of the line you need is as follows:
extern devicetype devicename;
So the LeftMotor would become
extern motor LeftMotor;

1 Like

Thanks, much appreciated

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.