Using GitHub

Once you’ve successfully made a PlatformIO project for a specific datalogger you can put the code that you used on the GitHub repository using GitHub Desktop.

Directions

I’ll be using a PlatformIO project called logger-00002 as an example. This is an example of a project created using the steps earlier in the tutorial.

  1. Navigate to the folder for your PlatformIO project that you wish to preserve on GitHub. Do this by right clicking the parent folder within PlatformIO (logger-00002) and clicking Show in File Manager

  2. Once in the file explorer, navigate within the project to the src folder. Go inside the src folder and right click the .ino file (example - logger-00002.ino). Copy this file.

  3. Using the file explorer, navigate to the folder called Logger-Code within the Stream_Gauges GitHub repository folder (Documents\GitHub\Stream_Gauges\Deployment code\Logger-Code). Create a new folder with the name of your PlatformIO project (example - logger-00002).

  4. Paste your .ino file into your new folder.

  5. Repeat steps 2 - 4 for the platformio.ini within your PlatformIO project. This file will be in the PlatformIO project folder.

  6. Open GitHub Desktop and make sure that the current repository is set to Stream_Gauges (Upper left of screen).

  7. Write a summary of the changes that you made in the “summary” box in the bottom left. In this case, write something along the lines of “made new folder and code for logger-00002”. Press the Commit to Master button at the bottom left to commit your changes.

  8. Press the button that appears for Push changes to origin or something along those lines.

  9. Celebrate! 🎉 You just made a new folder of code for a datalogger and uploaded it to GitHub! You can check to see if everything worked by looking at the GitHub repo online.