Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

At a Glance

Table of Contents
excludeAt a Glance

Prerequisites

...

Code Block
# Move to the firmware folder (if you weren't already there)
cd ~/shared/firmware
# Checkout the wip_getting_started branch (just in case)
git checkout wip_getting_started
# Check what branch we're on and if we have any changes
# This should say something along the lines of "nothing to commit, working directory clean"
git status

Controlling an LED - HAL

Let's update getting_started for basic General Purpose Input/Output (GPIO) pin control. We'll assume that our LED is an active-low (turns on when output is 0) and connected to PC9 (port C, pin 9).

...

Woah, there's a lot going on here! Do you understand how everything works?

Code Breakdown - HAL

First, it really helps to have the firmware folder open in your editor so you can reference our source code.

...

Try playing with the code - adjust the timeout, replace wait(), change the LED, add another LED at a different interval, etc.

Cleanup and Commit - HAL

You should know the drill:

...