Skip to content

Commit

Permalink
Bash Unit Update 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Dev Ramesh committed Sep 16, 2020
1 parent 237556e commit 1a1e1f6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
11 changes: 6 additions & 5 deletions book/duckiesky_high_school/14-computing/10-pi/20-pi-bash.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,27 +76,28 @@ Recommended: 5 minutes

**Hook:**

- This will be a lesson for the student on Bash scripting and the Shell. It is important to learn how to utilize a shell as it is the introduction to the inner processes of the operating system.
- This will be a lesson for the student on Bash and the Shell. It is important to learn how to utilize a shell as it is the introduction to the inner processes of the operating system. Additionally, the shell will be our gateway to interacting with the Pi on our drone.
- Conceptually connect Bash to Markdown in the sense that the computer is being affected via text: the purpose of Bash is to “control” the computer vs whereas Markdown is utilized for the purpose of "visual layout."

### Main Lesson

Recommended: 35 minutes
Recommended: 40 minutes

Teachers can either use a live demonstration of the exercise via a projector using the webpage for the Pi's text editor where students follow along, let students follow along with the student book instructions, or utilize an online Bash tutorial (see _Useful Resources and References_ below) that the students can work through as an alternative.

- (Optional) Have the teacher check off the outputs in the terminals for the exercise

By the end of the Main Lesson, students should be able to:

- See basic information in the terminal and navigate the file system (pwd, ls, cd).
- Creating, moving, and removing files and directories (touch, mv, cp, rm, mkdir, rmdir).
- Creating and removing files and directories (touch, rm, mkdir, rmdir).
- Using a carat to output to a file (e.g. "echo 'foo' >bar.txt").
- Printing output in the terminal (echo, cat).
- Clearing terminal output and exiting (clear, exit).
- Making and executing a Bash script

### Ending The Lesson

Recommended: 20 minutes
Recommended: 15 minutes

Better: Exercise: Students should do the exercise in the textbook with Bash commands to test out their knowledge of the terminal. They can do this through the online web editor when connected to the Pi.

Expand Down
6 changes: 3 additions & 3 deletions book/duckiesky_high_school/14-computing/10-pi/30-pi-led.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ Recommended: 20 minutes

1 - Teachers cover what a REPL (Read–eval–print loop) is and what a script is

In the [bash lesson](https://docs.duckietown.org/daffy/downloads/duckiesky_high_school/docs-duckiesky_high_school/branch/daffy-develop/doc-duckiesky_high_school/out/computing_pi_bash.html), we have already learned how to control our computer in the terminal. However, we seem to only able to type one line/command at a time. Can we do better than that? Before we discuss the possibilities, we introduce two related terminologies.
In the [bash lesson](#computing-pi-bash), we have already learned how to control our computer in the terminal. However, we seem to only able to type one line/command at a time. Can we do better than that? Before we discuss the possibilities, we introduce two related terminologies.

- Read–eval–print loop: a simple interactive computer programming environment that takes **single** user inputs, executes them, and returns the result to the user.

- Script: a programming language for a special run-time environment that automates the execution of tasks; the tasks could alternatively be executed **one-by-one** by a human operator.

See: Difference: script saves the commands to be run sequentially in the future, while the REPL runs only one command at a time. Previously in the [bash lesson](https://docs.duckietown.org/daffy/downloads/duckiesky_high_school/docs-duckiesky_high_school/branch/daffy-develop/doc-duckiesky_high_school/out/computing_pi_bash.html), all the commands you ran were executed by the REPL. In this lesson, you will learn how to 'save' multiple commands and run them all at once in bash!
See: Difference: script saves the commands to be run sequentially in the future, while the REPL runs only one command at a time. Previously in the [bash lesson](#computing-pi-bash), all the commands you ran were executed by the REPL. In this lesson, you will learn how to 'save' multiple commands and run them all at once in bash!

2 - Teachers speak on Pi GPIO numbering

Expand All @@ -108,7 +108,7 @@ Recommended: 35 minutes

Better: Exercise: Instructors show how to make and run bash scripts, delays, printing, pin setting by leading students write a bash script to make the led that they've soldered blink.

[See the student book for details](https://docs.duckietown.org/daffy/downloads/duckiesky_high_school_student/docs-duckiesky_high_school_student/branch/daffy-develop/duckiesky_high_school_student/out/computing_pi_led.html)
See the student book for details

**Useful Resources and References**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,17 @@ Localization: the fact of being or becoming located or fixed in a particular pla

S.L.A.M. (acronym): simultaneous localization and mapping problem



### Ending The Lesson

Recommended: 10 - 15 minutes


Better: Exercise: Have the drone use it to localize and fly to different targets.


**Useful Resources and References**


1. [Oxford Dictionary](https://onlinelibrary.wiley.com/doi/full/10.1002/047134608X.W8318) - Definition of localization

0 comments on commit 1a1e1f6

Please sign in to comment.