|
161 | 161 | "\n", |
162 | 162 | "Select the \"Connect\" button at the bottom right of this screen and a panel is displayed\n", |
163 | 163 | "\n", |
164 | | - "Select the \"Connect Device\" Button, and when the selection dialog appears, select the port with that displays ***Board in FS mode (...)*** or ***Board CDC (...)***\n", |
| 164 | + "Select the \"Connect Device\" Button, and when the selection dialog appears, select the port that displays ***Board in FS mode (...)*** or ***Board CDC (...)***\n", |
165 | 165 | "\n", |
166 | 166 | "\n", |
167 | 167 | "\n", |
168 | | - "With the RedBoard connected, use the following MicroPython commands to blink the LED. \n", |
| 168 | + "With the RedBoard connected, use the following MicroPython commands to write to the RGB LED. \n", |
169 | 169 | "\n", |
170 | 170 | "### Using MicroPython\n", |
171 | 171 | "\n", |
172 | | - "The following MicroPython commands are entered to blink the LED on your board. \n", |
| 172 | + "The following MicroPython commands are entered to write to the RGB LED on your board. \n", |
173 | 173 | "\n", |
174 | 174 | "**REMEMBER** To enter a MicroPython command, hold down either the Control (on Windows) or Command (on Mac) key when pressing *Enter*\n", |
175 | 175 | "\n", |
|
179 | 179 | "\n", |
180 | 180 | "#### Step 1 - Setup\n", |
181 | 181 | "\n", |
182 | | - "To blink the LED, we need to enable the board pin **34** (the pin that the LED is connected to in the circuit). \n", |
| 182 | + "To write to the RGB LED, we need to enable the board pins **32**, **30**, and **28** that the RGB's color leads are connected to. \n", |
183 | 183 | "\n", |
184 | 184 | "To do this we **load the Pin definition for the board**" |
185 | 185 | ] |
|
257 | 257 | "source": [ |
258 | 258 | "Next, lets create our own *functions* for controlling color. Functions contain several lines of code that we want to reuse often without typing all of them out every time. For example, we would love to set the led to \"blue\" without having to type three lines of code every time. By putting the lines of code in a function, we just have to type that function's name to call those three lines of code. \n", |
259 | 259 | "\n", |
260 | | - "TODO: Maybe make this less verbose or remove it...\n", |
| 260 | + "**TODO: Maybe make this less verbose or remove it...**\n", |
| 261 | + "\n", |
261 | 262 | "Functions also keep repeated code in the same place. Imagine we wanted to change something about the way our \"blue\" function behaved. If we had repeated the three lines of code in several places of our program, we would have to fix it for each of those places. But with a function, we would correct it once in our function and leave all the places that function was used untouched." |
262 | 263 | ] |
263 | 264 | }, |
|
0 commit comments