🛠️ Setup instructions¶
Follow these steps once, before starting Session 1.
1. 💻 Set up your IDE¶
Note
In this tutorial, we use the PlatformIO extension of VSCode to compile code and upload it to the Arduino. You can also use the Arduino IDE, but you will have to troubleshoot issues on your own.
Danger
If you're using Windows Subsystem for Linux (WSL), things might be less straightforward. You can try this (unverified by us) tutorial, and please let us know in an issue if it worked.
- Download and install VSCode.
- In VSCode, open the Extensions tab (in the left toolbar), search and install the PlatformIO IDE extension.
- Restart VSCode.
2. 🍴 Fork and clone the mini project¶
Note
This section requires minimal experience with git and GitHub. If you're not familiar with these VERY important software development tools, please check the following links before proceeding with this section.
- 25 Basic Linux Commands.
- Git and GitHub Introduction.
- Creating an account on GitHub.
- Git Config (set your email as the one you used for your GitHub account).
- Fork a repository.
- Cloning a repository.
- Go to the project's GitHub repository home page.
- [Optional] if you find this tutorial useful, click on the Star button in the top right corner (much appreciated).
- Click on the Fork button in the top right corner.
- In
Choose an owner, choose your personal GitHub account, leaveCopy the main branch onlyticked, and click onCreate fork. -
In your fork, click on
Code→HTTPS, and copy the URL.Warning
Make sure the URL is
https://github.com/<your_username>/iot-button-systemand NOThttps://github.com/David-GERARD/iot-button-system. -
In VSCode, open a terminal (I would recommend using a unix-style terminal such as bash, Git bash if you are on windows, zsh...), navigate to where you want to store the project, and clone the repository.
If you want to see the entire project in VSCode, click on File → Open folder... and select the cloned folder. It contains both the PlatformIO project with the Arduino Firmware (in firmware/), config files for AWS IoT Core (in infra/), and AWS Lambda functions coded in Python (in lambdas/).
3. 🤝 Add a course educator as a collaborator¶
Note
Each task you complete will be submitted as a pull request and reviewed by one of the course educators (see the branch/pull request workflow described at the start of every task). For them to be able to review your pull requests, they need to be added as a collaborator on your fork.
- In your fork on GitHub, go to
Settings→Collaborators and teams. - Click on
Add people, and search for the GitHub username your course educator gave you. - Select the
Readrole — this is enough to view your code and review pull requests. - Click
Add <username> to this repository.
4. 🔌 Open the Arduino firmware in PlatformIO¶
- In VSCode, click on the PlatformIO tab (in the left toolbar).
- In
Project Tasks, click onPick a Folder(you might need to scroll down). Navigate to the cloned repository, and inside it, select the folderfirmware/.
5. 🧰 Gather your hardware¶
Make sure you have the following before starting Session 1:
- Arduino MKR WiFi 1010.
- MKR Connector Carrier.
- LED kit.
- Push button kit.
6. ☁️ Set up your AWS account¶
Warning
The free tier of AWS lasts 6 months, and an email address can only be used once to create an AWS account. If you have an AWS account but the free tier expired, create a new one using a different address (you can create a free Gmail account if need be).
Tip
For the group project, it is best that you use a single AWS account, and have its owner create IAM users for each team member. Make sure to grant these IAM users the right permissions to perform their required tasks.
If need be, create a new AWS account and IAM users for each team member (and yourself — it is good practice to only use root access for permission management).
You're all set. Before diving into Session 1, read the Development Workflow page — it explains the branch/commit/pull request/tag cycle you'll repeat for every task.