Please watch the linked video and follow along to build an analog-controlled LED circuit.
Category: Programming A/B
In order to make our Circuit Playground Express portable, we need to wire up a battery pack. We could buy battery packs online for about $3 each and wait a week for them to arrive. OR we could learn how to disassemble broken or obsolete electronics and get what we need for free, along with a bunch of other parts we can use to create something new.
For our next project, we need to find 1) 2-wire JST keyed connector. It looks like this:
The CPE board has a female connector (like the one on the left). We are looking for a male connector that fits inside it (like the one on the right). Many small electronics use JST connectors like this to supply power to internal components. Computers often power speakers and power buttons with JST connectors.
Another useful component is a battery holder. We can make our own, but it is also possible to salvage them from old toys and video game controllers. We need one that holds 3 AAA or 3 AA batteries to supply 3.5-6 volts. We can modify a 4-AAA or 4-AA holder.
Here is a guide for removing soldered components from PCB boards.
Here is a handy reference to the Circuit Playground Express board we are using in Programming Class. Take a few minutes to read through the guide to familiarize yourself with the capabilities of the board. What will you create?
Instead of using the drag and drop editor to create a program, you can use all of your PYTHON coding skills to code the Circuit Playground from MU, a Python code editor. Follow the link below to get up and running with the MU editor and familiarize yourself with the features of Circuit Playground
Today you will create a Hogwarts “sorting hat” program, to properly sort new candidates into the assigned house. If you aren’t a Harry Potter fan, you can sort people into personality groups, teams, etc.
Watch the introductory video, plug in your CPE and get started. This project uses MakeCode.
Follow the link to Create a Circuit Playground Sorting Hat
Students should be finished with lessons 5.1-5.5 in the Python course on Repl.it by April 5(B) or April 6(A). Students are reminded that programming assignments should be done outside of class if you are unable to complete 2 lessons per class period (or are behind in assignments).
Remember that the step-by-step lessons can be VERY helpful if you are having difficulty understanding how the coding concept you are working with should be used.
We will continue with unit 4, For Loops this week. Those who are able to finish before the end of the week should continue on to units 5-6.
Complete the “For i in range” unit through lesson 4.9 during the next three class periods.
You will need to use your knowledge of past concepts (if/else, print(), using variables) along with the new structure. The For i in Range is very similar to the Repeat loop in Scratch, as it repeats sections of code a specific number of times. It is possible to use a variable for the start, stop and step parameters. To go backwards, use a larger number for the start parameter, a smaller number for the stop parameter and a negative number (usually -1) for the increment (or step) parameter.
Those who have finished unit 4 or 5, please continue on to the next section.