The very basics for starting an Arduino project on Platform-io, with some modern formatting constraints.
- Make sure you have GCC installed from somewhere like msys2.org and clang-formatter
- Clone this repo wherever you like - rename as appropriate, then move into the folder
- Delete the
.git
folder that came with the repo, and restart a new git environment (To unlink from this base repo, and start your new project)
rmdir .git
git init
- Activate the virtual environment
.\venv\Scripts\Activate
- Run a few commands to install clang-format and start pre-commit working
python -m pip install clang-format
pip install pre-commit
pre-commit install
pre-commit run
- Change the configurations and secrets (described below)
- This is probably a good time to do your first commit -- just sayin'
- Happy coding! - continue your project from here
Most of the configuration that would vary project-to-project is in the platformio.ini file. This example is set-up for an Arduino Uno, because they're so ubiquitous. The environment is also set-up for 'COM6' on a Windows PC, but you likely want a different configuration.
There is a secrets-example.h that you should copy/paste into your own secrets.h
file, in case you have any passwords or other credentials to hide. If you use the 'magic name' secrets.h
this will already be covered by .gitignore, and not uploaded to an online repo.