diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2022-09-28 15:20:04 -0400 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2022-09-28 15:20:04 -0400 |
commit | b9eb6026c409fa9115011b233a040e3ad6c79839 (patch) | |
tree | 0ce4fc414cbb3eb27597d0d7ddbd85e9e7f51914 | |
parent | 9dd656dde8eaed8e354fc478713f4da02cc860a8 (diff) |
Configure libRobus with git submodulesdevelopment
-rw-r--r-- | .gitignore | 8 | ||||
-rw-r--r-- | .gitmodules | 3 | ||||
-rw-r--r-- | lib/readme.txt | 41 | ||||
-rw-r--r-- | parcours-1.ino | 11 | ||||
-rw-r--r-- | platformio.ini | 18 | ||||
-rw-r--r-- | src/main.ino | 56 | ||||
-rw-r--r-- | src/readme.txt | 2 | ||||
-rw-r--r-- | tags | 25 |
8 files changed, 164 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ec712b4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +.pio +.vscode/.browse.c_cpp.db* +.vscode/c_cpp_properties.json +.vscode/launch.json +.vscode/ipch +*.checksum +build/* +.vscode/extensions.json
\ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..b41568f --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "build/piolibdeps/megaatmega2560/LibRobus"] + path = build/piolibdeps/megaatmega2560/LibRobus + url = https://github.com/UdeS-GRO/LibRobUS.git diff --git a/lib/readme.txt b/lib/readme.txt new file mode 100644 index 0000000..a7f5971 --- /dev/null +++ b/lib/readme.txt @@ -0,0 +1,41 @@ + +This directory is intended for the project specific (private) libraries. +PlatformIO will compile them to static libraries and link to executable file. + +The source code of each library should be placed in separate directory, like +"lib/private_lib/[here are source files]". + +For example, see how can be organized `Foo` and `Bar` libraries: + +|--lib +| | +| |--Bar +| | |--docs +| | |--examples +| | |--src +| | |- Bar.c +| | |- Bar.h +| | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html +| | +| |--Foo +| | |- Foo.c +| | |- Foo.h +| | +| |- readme.txt --> THIS FILE +| +|- platformio.ini +|--src + |- main.c + +Then in `src/main.c` you should use: + +#include <Foo.h> +#include <Bar.h> + +// rest H/C/CPP code + +PlatformIO will find your libraries automatically, configure preprocessor's +include paths and build them. + +More information about PlatformIO Library Dependency Finder +- https://docs.platformio.org/page/librarymanager/ldf.html diff --git a/parcours-1.ino b/parcours-1.ino new file mode 100644 index 0000000..4f23216 --- /dev/null +++ b/parcours-1.ino @@ -0,0 +1,11 @@ +#include <stdio.h> +#include <LibRobus.h> +// ceci est le code qui va permettre au robot de completer le defi du parcours + +void setup(){ + BoardInit(); +} + +void loop(){ + +} diff --git a/platformio.ini b/platformio.ini new file mode 100644 index 0000000..17fbe57 --- /dev/null +++ b/platformio.ini @@ -0,0 +1,18 @@ +; PlatformIO Project Configuration File +; +; Build options: build flags, source filter +; Upload options: custom upload port, speed and extra flags +; Library options: dependencies, extra library storages +; Advanced options: extra scripting +; +; Please visit documentation for the other options and examples +; https://docs.platformio.org/page/projectconf.html +[platformio] +build_dir = build +libdeps_dir = build/piolibdeps + +[env:megaatmega2560] +platform = atmelavr +board = megaatmega2560 +framework = arduino +lib_deps = https://github.com/UdeS-GRO/LibRobUS
\ No newline at end of file diff --git a/src/main.ino b/src/main.ino new file mode 100644 index 0000000..a64da47 --- /dev/null +++ b/src/main.ino @@ -0,0 +1,56 @@ +/* +Projet: Le nom du script +Equipe: Votre numero d'equipe +Auteurs: Les membres auteurs du script +Description: Breve description du script +Date: Derniere date de modification +*/ + +/* **************************************************************************** +Inclure les librairies de functions que vous voulez utiliser +**************************************************************************** */ + +#include <LibRobus.h> // Essentielle pour utiliser RobUS + + + +/* **************************************************************************** +Variables globales et defines +**************************************************************************** */ +// -> defines... +// L'ensemble des fonctions y ont acces + + + +/* **************************************************************************** +Vos propres fonctions sont creees ici +**************************************************************************** */ +void maFonction(){ + // code +} + + +/* **************************************************************************** +Fonctions d'initialisation (setup) +**************************************************************************** */ +// -> Se fait appeler au debut du programme +// -> Se fait appeler seulement un fois +// -> Generalement on y initilise les varibbles globales + +void setup(){ + BoardInit(); +} + + +/* **************************************************************************** +Fonctions de boucle infini (loop()) +**************************************************************************** */ +// -> Se fait appeler perpetuellement suite au "setup" + +void loop() { + // SOFT_TIMER_Update(); // A decommenter pour utiliser des compteurs logiciels + delay(10);// Delais pour décharger le CPU + //Test pour commit via VS Code + //test + //test ann-sosdfsdf 2222222 +}
\ No newline at end of file diff --git a/src/readme.txt b/src/readme.txt new file mode 100644 index 0000000..cb756c6 --- /dev/null +++ b/src/readme.txt @@ -0,0 +1,2 @@ +Ce repertoire doit contenir vos fichier sources (*.h et *.cpp) pour qu'ils +soient compiles.
\ No newline at end of file @@ -0,0 +1,25 @@ +!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ +!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ +!_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ +!_TAG_OUTPUT_FILESEP slash /slash or backslash/ +!_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ +!_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ +!_TAG_PROC_CWD /home/master/Dropbox/A/scholar/sherbrooke/s1/prj/parcours-1/ // +!_TAG_PROGRAM_AUTHOR Universal Ctags Team // +!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ +!_TAG_PROGRAM_URL https://ctags.io/ /official site/ +!_TAG_PROGRAM_VERSION 5.9.0 /p5.9.20220828.0/ +Parcours Robus - Équipe 1 README.md /^# Parcours Robus - Équipe 1$/;" c +Parcours Robus - Équipe 1 build/sketch/README.md /^# Parcours Robus - Équipe 1$/;" c +additionalFiles build/build.options.json /^ "additionalFiles": "..",$/;" s +builtInLibrariesFolders build/build.options.json /^ "builtInLibrariesFolders": "\/usr\/share\/arduino\/libraries",$/;" s +builtInToolsFolders build/build.options.json /^ "builtInToolsFolders": "",$/;" s +compiler.optimization_flags build/build.options.json /^ "compiler.optimization_flags": "",$/;" s +customBuildProperties build/build.options.json /^ "customBuildProperties": "",$/;" s +fqbn build/build.options.json /^ "fqbn": "arduino:avr:mega:cpu=atmega2560",$/;" s +hardwareFolders build/build.options.json /^ "hardwareFolders": "\/home\/master\/.arduino15\/packages",$/;" s +loop build/sketch/parcours-1.ino.cpp /^void loop(){$/;" f typeref:typename:void +otherLibrariesFolders build/build.options.json /^ "otherLibrariesFolders": "\/home\/master\/Arduino\/libraries",$/;" s +runtime.ide.version build/build.options.json /^ "runtime.ide.version": "10607",$/;" s +setup build/sketch/parcours-1.ino.cpp /^void setup(){$/;" f typeref:typename:void +sketchLocation build/build.options.json /^ "sketchLocation": "\/home\/master\/Dropbox\/A\/scholar\/sherbrooke\/s1\/prj\/parcours-1\/parco/;" s |