diff --git a/.gitignore b/.gitignore index 2719e053..50ed131b 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ .vscode/extensions.json CMakeListsPrivate.txt cmake-build-*/ +custom_config.ini +!custom_config.ini.example diff --git a/custom_config.ini.example b/custom_config.ini.example new file mode 100644 index 00000000..36f85383 --- /dev/null +++ b/custom_config.ini.example @@ -0,0 +1,6 @@ +; This file should contain your local modifications to the PlatformIO.ini file. + +[env:esp32dev] +; upload_port: Optional. If not set, PlatformIO will try to autodetect the port. +; (for example for macOS:) +; upload_port = /dev/cu.SLAB_USBtoUART diff --git a/docs/guides/02_setup.md b/docs/guides/02_setup.md index 39b9959f..cb1a54b4 100644 --- a/docs/guides/02_setup.md +++ b/docs/guides/02_setup.md @@ -12,7 +12,15 @@ * Connect sensor -Alternatively you can also download the dependencies yourself and install it with the Arduino IDE. +Alternatively you can also download the dependencies yourself and install it with the Arduino IDE (see below). + + +### Troubleshooting +* Can't upload to device +You can specify the device port that VS Code should upload to. Duplicate the `custom_config.ini.example` file to `custom_config.ini` and set the `upload_port` there manually. If this option is not set, the upload port will be autodetected which can fail on some systems or might select the wrong device if other devices are plugged in. + +* Compiling the code fails +Use the `Clean` command and delete the `.pio` directory. Compiling the code again should work now. If any errors persist, please create a new issue! ## [CLion](https://www.jetbrains.com/de-de/clion/) diff --git a/platformio.ini b/platformio.ini index 3f945bf2..6f6d3a77 100644 --- a/platformio.ini +++ b/platformio.ini @@ -8,21 +8,26 @@ ; Please visit documentation for the other options and examples ; https://docs.platformio.org/page/projectconf.html +; If you need to set some configurations differently for your local setup, copy +; the 'custom_config.ini.example' to 'custom_config.ini' and put your changes there. +; This new file will be ignored by git and therefore won't be overwritten at some point. + [platformio] src_dir = OpenBikeSensorFirmware +extra_configs = custom_config.ini [env:esp32dev] platform = espressif32 board = esp32dev framework = arduino monitor_speed = 9600 -# The following dependencies can either use their full name or their (platformio library) id +; The following dependencies can either use their full name or their (platformio library) id lib_deps = - # ArduinoJson by Benoit Blanchon + ; ArduinoJson by Benoit Blanchon ArduinoJson - # CircularBuffer by AgileWare + ; CircularBuffer by AgileWare CircularBuffer - # TinyGPSPlus by Mikal Hart + ; TinyGPSPlus by Mikal Hart 1655@1.0.2 - # SSD1306 by ThingPulse + ; SSD1306 by ThingPulse 562