Session Details
Week 1,
Session 2 — Tue Mar 9
Reading
-
Zelle §1.3, 1.5-1.9, and 2.1-2.4
(24 pages)
HW Due
-
HW 1
Topics
-
Introduction to functions: defining and calling
-
Basic program structure
-
Introduction to the Create robot
- Hardware: actuators and sensors
- UART, wireless communication
- Programming with PyCreate
Outline
-
[5 min] Begin the process of getting robots from the lockers and checking them out. Continue this in parallel with the next few activities.
-
[5 min] Hand-back quizzes, discuss questions
-
[5 min] Show off animations from HW1
-
[5 min] Introduction to functions:
- Defining a function
- Invoking (calling) a function
- Function parameters
-
[15 min] Basic program structure: chaos.py
- Comments
- The main function
- The input, compute, output pattern
- The input expression
- print statements
- Variables and assignment
- for loops and loop bodies
-
[5 min] Break (but have pairs begin to connect to their laptop, per forthcoming activity)
-
[15 min] Robots! Introduction to the Create's hardware
- Actuators (Create outputs)
- Sensors (Create inputs)
-
[5 min] Robots! Communicating wirelessly between your laptop and the Create
-
[5 min] Connecting your Create robot to your laptop. Do this one pair at a time, in parallel with the next activity.
-
[15 min] Robots! Introduction to programming the Create with PyCreate
-
[5 min] Finish daily quiz
-
[20 min] Students work on their Song 'n' Dance project
Resources
-
Slides: Functions, Basic program structure, and an Introduction to the Create robots
-
The Pycreate.pdfPyCreate library API
-
The Create Open Interface (OI) specification
-
The Create Users Manual
-
The BAM (Bluetooth Adapter Module) for wireless communication
HW Assigned
-
HW 2