From the course: Learning CircuitPython with Circuit Playground Express

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Solution

Solution - Python Tutorial

From the course: Learning CircuitPython with Circuit Playground Express

Start my 1-month free trial

Solution

(upbeat music) - [Instructor] The first challenge was to set on and off times so the total blink time was one half second. One solution is to make the on and off times each a quarter or .25 seconds. Let's see how this works in the code. Okay so here I am on the desktop. I'm going to open the Atom editor. And I'm going to make this full screen just so it's less distracting. And now I'm going to open up from the circuit pie drive the main program that's on there now which is the normal blink program. Okay, you can see that here. And you can see the rate at which it's blinking. So let's change that though to a quarter of a second. Another quarter of a second. Now when I save this, you can see that the blink speed increases by two so now instead of blinking once every second it's blinking once every half second. Let's go to the second challenge. The second challenge was to set on and off times so the on time was a tenth…

Contents