Interactive Programming: Python & RobotsAbout
From Tortoise to Finch
Robots at Work
October 20, 2018
Jasmine got her Finch to sing Yankee Doodle Dandy!
Below is code to play the scales. You might want to modify it to create your own compositions!
The program above uses a list to keep track of frequencies. See Lesson 13 if you're interested in using a dictionary to match keys with notes.
Kupu and Neel did a nice job of compressing their maze folders.
if, elif, and else
Connor has come up with a couple of cool strategies for interactive steering. Here's one that works for both the turtle and the finch:
How could you adapt this code to work with the finch?
Below is a code fragment based on work that Connor did last week. What does it do?
What's the advantage of this strategy? Could you use this strategy with the finch?
However, in lesson 14, you'll learn how to use the tkinter module with the finch. Here's a short program that uses tkinter that will give you an idea of what you can do with it:
Could this key binding be used to steer the finch? Could the turtle screen's onkeypress method be used to steer the finch?
October 13, 2018
Individual Work Period
If you and one other person would like to team up during this time, that's fine. I can also do a random assignment of partners for people who want a random partner assigned to them.
Why do so many robots look like animals and humans?
Robots have been made to mimic all kinds of animal life, including humans, insects, birds, reptiles, mammals, fish, and even an octopus. Why do so many engineers use animals as the basis for their robot designs? We'll discuss this question and look at a short video about a robotic wild dog.
October 6, 2018
Virtual and Physical Robots
We'll watch a video about robots and discuss the difference between working with virtual and physical robots.
I'll use a Python program to pick random pairs for pair programming. During the pair programming session, you'll work through the first finch lesson from Birdbrain.
Virtual and Physical Robots
True or False?
We'll take a break by playing a game to get to know each other. You'll take turns telling us one statement about yourself that's true, and one that's false. The rest of us has to guess which statement is true.
September 29, 2018
Welcome to Interactive Programming: Python & Robots! Here's what we'll do today:
In Between Times
I sometimes make videos available on class web pages. To watch the videos, you can ask for headphones or use your own headphones or earbuds if you brought them.
Prepare for your first Finch lesson
Download the Finch Python software. Unzip the FinchPython120.zip file and open the FinchPython120 folder.
After pairs have been assigned, decide with your partner which mac you'll attach to your Finch to begin the first lesson. Hook up the Finch to the USB port on your mac. You should see the LED cycle through colors.
From the FinchPython120 folder, open dance.py with Thonny. Run the dance.py program to see your Finch dance.
Go to Birdbrain Lesson 1. Run the code shown to get the Finch to go forward a bit and then stop. Switch navigator and driver roles for Exercise 1 and for each exercise after that.
Here are some things you might want to do at home: