Prepare for compile: Difference between revisions
Line 41: | Line 41: | ||
Rename the '''basebot_6''' directory to '''src''', as this is mandatory for '''MS Visual studio code'''. | Rename the '''basebot_6''' directory to '''src''', as this is mandatory for '''MS Visual studio code'''. | ||
Open the code | Open the code using the PlatformIO icon [[file:MS_Visual_Studio_Code_Platform_IO_icon.png]]: | ||
PlatformIO -> "QUICK ACCESS" -> "PIO Home" -> "Open" and here press "open project" | |||
[[file: MS_Visual_Studio_Code_new_project_1.png | 500px]] | [[file: MS_Visual_Studio_Code_new_project_1.png | 500px]] |
Revision as of 11:18, 1 September 2024
Back to Basebot
Development environment (IDE)
Arduino
Install Arduino support; see Arduino and Teensy libraries
Open Arduino and select the basebot_6.ino.
Then, set the board to Teensy 4.1.
You should now be able to compile and upload the code to the robot.
Note
Editing the basebot files in the src subdirectory can not be done in the Arduino IDE, but maybe that is unnecessary.
The basebot will send data to the serial monitor. This data needs to be stored in a file for Matlab use, and another serial monitor or other tool probably has to be used.
Visual studio code (Linux)
Install MS Visual Studio; see Visual studio install
Create a directory called src that links to the basebot_6 directory. In a terminal in the working directory where you installed the code:
cd basebot ln -s basebot_6 src
This step is needed, as MS Visual Studio Code need this directory for the actual code.
Visual studio code (Windows)
Install MS Visual Studio; see Visual studio install
Rename the basebot_6 directory to src, as this is mandatory for MS Visual studio code.
Open the code using the PlatformIO icon :
PlatformIO -> "QUICK ACCESS" -> "PIO Home" -> "Open" and here press "open project"
Makefile
If you use any other development platform (or just an editor), then using the provided Makefile could be an option.
However, as Arduino was changed to version 2.*, support for Makefile was reduced, or at least more difficult. If you would use the Makefile, install version 1.8.19 of Arduino and the corresponding version of Teensyduino.
One line (line 31) in the Makefile should be changed so that BASEPATH points to the installed version.
The extra packages need to be downloaded and added to the library path - see Arduino installation for Regbot.