-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from lf-lang/docs
Start on reworking lab structure
- Loading branch information
Showing
15 changed files
with
131 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,6 +59,7 @@ src-gen/ | |
/include/ | ||
.vscode/ | ||
include/ | ||
.project | ||
|
||
# pico setup script location | ||
pico/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Hill Climb | ||
|
||
The purpose of this exercise is to program the Pololu robot to execute a specified task, namely to climb a ramp, detect when it reaches the top, turn around, and drive back down the ramp, all without falling off the edge of the ramp. | ||
|
||
**FIXME:** From chapter 8 of 3d edition. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Installation | ||
|
||
**FIXME:** Point to VM. | ||
|
||
The labs may also be run directly using a Linux, Mac, or Windows machine, the latter with the Windows Subsystem for Linux (WSL). There are four main components that need to be installed: | ||
|
||
- The lf-pico repository, which contains the lab exercises and supporting code. | ||
- [Lingua Franca](https://lf-lang.org), a coordination language that provides timing, concurrency, and state-machine models. Program logic is written in C. | ||
- Visual Studio Code (VSCode or just code), an Integrated Development Environment provided by Microsoft that supports Lingua Franca together with C programming and debugging. | ||
- The Raspberry Pi Pico tools, which include a cross compiler and Software Development Kit (SDK). | ||
|
||
The remainder of this section gives instructions for installing each of these components. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Interrupts | ||
|
||
The purpose of this lab exercise is to understand how interrupts work. As a side effect, you will also learn how to use a logic analyzer to obtain detailed information about what a microcontroller is doing. | ||
|
||
**FIXME:** From chapter 5 of 3d edition. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,34 @@ | ||
# Introduction | ||
This series of labs is a targeted effort to create a minimal set of laboratory | ||
exercises designed to exposes students to introductory embedded systems concepts. | ||
The labs however have a focus on cyber physical systems modeling techniques and use | ||
the lingua franca coordination framework as a lightweight concurrency layer and | ||
reactor modeling tool. All code is run on the inexpensive raspberry pi pico ❤️. | ||
This series of labs exposes students to introductory embedded systems concepts. | ||
The labs focus on cyber physical systems modeling and design. | ||
They use the [Lingua Franca coordination language](https://lf-lang.org) to provide timing, concurrency, and state-machine modeling (via its modal models). | ||
All code is run on an inexpensive Raspberry Pi Pico ❤️. | ||
The labs are designed to be companion exercises for a course based on [Lee and Seshia, _Introduction to Embedded Systems: A Cyber-Physical Systems Approach](https://leeseshia.org), MIT Press, 2017. | ||
|
||
## Prerequisites | ||
These exercises assume that students are reasonably familiar with or able to quickly learn: | ||
|
||
- programming in C | ||
- [C introduction](https://www.w3schools.com/c/c_intro.php) | ||
- Unix-like command-line tools | ||
- [bash cheat sheet](https://github.com/RehanSaeed/Bash-Cheat-Sheet) | ||
- [GitHub git cheat sheet](https://training.github.com/downloads/github-git-cheat-sheet/) | ||
- [Unix reference card](https://www.cs.jhu.edu/%7Ejoanne/unixRC.pdf) | ||
- [Command line reference](https://ss64.com) | ||
|
||
## Acknowlegments | ||
These labs are derived from several generations of lab exercises for the Berkeley EECS 149/249A course, Introduction to embedded systems. Contributors to the lab design include: | ||
|
||
- Joshua Adkins | ||
- Prabal Dutta | ||
- Branden Ghena | ||
- Shromona Ghosh | ||
- Abhi Gudrala | ||
- Jeff C. Jensen | ||
- Eric S. Kim | ||
- Edward A. Lee | ||
- Shaokai Lin | ||
- Marten Lohstroh | ||
- Sanjit Seshia | ||
- Trung Tran | ||
- Matthew Weber |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Embedded Programming with LF | ||
|
||
The purpose of this lab exercise is to learn to use the [Lingua Franca coordination language](https://lf-lang.org) to program an embedded bare-metal microcontroller, specifically the RPi-Pico on the Pololu robot. You will learn debugging strategies while you create a reusable LED reactor that can be used in other applications to provide information through the robot's LEDs. | ||
|
||
**FIXME:** From chapter 2 of 3d edition. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Peripherals and Memory-Mapped I/O | ||
|
||
The purpose of this lab exercise is to learn how sensors and actuators are connected to a microcomputer and how the memory system abstraction is used to access and control them. | ||
|
||
**FIXME:** From chapter 4 of 3d edition. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Robot | ||
|
||
The purpose of this exercise is to write software that uses sensor data to maneuver the Pololu robot. | ||
|
||
**FIXME:** From chapter 7 of 3d edition. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Interfacing with Sensors | ||
|
||
The purpose of this exercise is to learn to read sensor values on a microcontroller and to interpret those values. You will read accelerometer data from a device on the Pololu robot, convert the readings to meaningful units, and use the results to estimate the tilt of the surface on which the robot sits. As a side effect, you will gain experience reading a technical datasheet. | ||
|
||
## Prelab | ||
|
||
### References | ||
|
||
* Chapter 7, Sensors and Actuators, of [Lee and Seshia](https://leeseshia.org) | ||
* [ST LMS6DSO inertial module datasheet](https://www.pololu.com/file/0J1899/lsm6dso.pdf) | ||
|
||
### Questions | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Timers | ||
|
||
In previous lab exercises, Lingua Franca provided a built-in mechanism to control the timing of a programming execution. Ultimately, that mechanism is built using timers, which are peripheral devices associated with the microprocessor that measure time and raise interrupts at specified points in time. | ||
|
||
**FIXME:** From chapter 6 of 3d edition. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Wireless | ||
|
||
The purpose of this lab is to augment the Pololu robot with a Bluetooth Low Energy (BLE) radio link and to use that exchange data with a host computer. | ||
|
||
**FIXME:** From chapter 8 of 3d edition. |