Skip to content

Commit 3fb62f2

Browse files
authored
Merge pull request #112 from makeabilitylab/feat/a11y-sweep
Accessibility content sweep: media titles, video aria-labels, image alt text (#110)
2 parents 2889bed + b4679d7 commit 3fb62f2

18 files changed

Lines changed: 302 additions & 101 deletions

advancedio/addressable-leds.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ The wiring for addressable LEDs is simple—just three connections:
308308

309309
### Preparing the LED stick
310310

311-
![](assets/images/RGBLEDStick_8LEDs_SolderPadsAndLEDS.png)
311+
![Back and front views of an 8-LED WS2812B stick, showing the solder pads and the row of addressable RGB LEDs](assets/images/RGBLEDStick_8LEDs_SolderPadsAndLEDS.png)
312312
**Figure.** The back and front sides of an 8-LED WS2812B stick. We will need to solder either jumper wires or header pins to the pads.
313313
{: .fs-1 }
314314

@@ -413,7 +413,7 @@ void loop() {
413413

414414
If your colors look wrong (*e.g.,* you asked for red but got green), try changing `NEO_GRB` to `NEO_RGB` in the strip constructor. This is the most common issue students encounter!
415415

416-
![](assets/images/AddressableLEDs_RainbowStatic8.png)
416+
![An 8-LED addressable RGB stick lit up in a static rainbow gradient from red through green to blue](assets/images/AddressableLEDs_RainbowStatic8.png)
417417
**Figure.** An image of the RGB LED stick running the above code. You can also view and play with this on [Tinkercad](https://www.tinkercad.com/things/lSqArYGju94-neopixel-strip-8-static-rainbow). See our [RainbowStatic8.ino](https://github.com/makeabilitylab/arduino/blob/master/AddressableLEDs/NeoPixel/RainbowStatic8/RainbowStatic8.ino) and [RainbowStatic.ino](https://github.com/makeabilitylab/arduino/blob/master/AddressableLEDs/NeoPixel/RainbowStatic/RainbowStatic.ino) sketches in GitHub.
418418
{: .fs-1 }
419419

advancedio/smoothing-input.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ usetocbot: true
2323

2424
By now, you may have noticed that your analog input data can be noisy. How can we smooth our input and what factors should we consider?
2525

26-
<video autoplay loop muted playsinline>
26+
<video aria-label="A noisy analog input signal (blue) being smoothed in real time by a moving average filter with a window size of 10 (red), graphed in the Arduino Serial Plotter" autoplay loop muted playsinline>
2727
<source src="assets/videos/MovingAverageFilterWindowSize10-Optimized.mp4" type="video/mp4" />
2828
</video>
2929

@@ -52,7 +52,7 @@ When reading sensor data using analog input pins on a microcontroller (*e.g.,* v
5252

5353
Even with a simple potentiometer, we can observe noise on our input pin. In the video below, we are **not** touching the potentiometer and yet the analog input is oscillating between 142 and 143 (0.694V and 0.699V)—shown as the blue line. You may have experienced this too in your own potentiometer-based projects or in the [Arduino potentiometer lesson](../arduino/potentiometers.md). In this case, we fixed this "input noise" by smoothing the signal using a moving average filter—shown in red—which we will describe in this lesson.
5454

55-
<video autoplay loop muted playsinline>
55+
<video aria-label="A potentiometer's raw analog input (blue) oscillating between 142 and 143 while untouched, with the noise removed by a moving average filter of window size 10 (red)" autoplay loop muted playsinline>
5656
<source src="assets/videos/PotentiometerOscillatingWithNoInputButFixedWithMovingAverage-Optimized.mp4" type="video/mp4" />
5757
</video>
5858
**Video.** In this video, we're graphing the raw analog input (blue line) from a potentiometer along with a "smoothed" version (red line). Although we're not touching or using the potentiometer, the analog input is oscillating between 142 and 143 (0.694V and 0.699V). We smooth this noise using a moving average filter (window size = 10)—shown in red. Note that, depending on the oscillation pattern, a different window size or smoothing approach may be necessary. Read more about potentiometer noise [here](https://passive-components.eu/resistors-potentiometers-basic-principles/). Graph made with the built-in [Arduino Serial Plotter](https://diyrobocars.com/2020/05/04/arduino-serial-plotter-the-missing-manual/).
@@ -92,7 +92,7 @@ This filter is a type of **low-pass** filter because it smooths out (eliminates)
9292

9393
You can control the filter's performance by tweaking the size of the sliding window. The animation below demonstrates a sliding window of size 3. The blue line corresponds to the raw input signal; the orange line, the smoothed filter output. For illustrative purposes, we only show the sliding window applied to a subset of data.
9494

95-
<video autoplay loop muted playsinline>
95+
<video aria-label="An animation illustrating a moving average filter with a window size of 3 sliding over a raw input signal (blue) to produce the smoothed output (orange)" autoplay loop muted playsinline>
9696
<source src="assets/videos/MovingAverageFilter_PowerPointAnimation_TrimmedAndCropped.mp4" type="video/mp4" />
9797
</video>
9898
**Video** This video illustrates a moving average filter of window size 3 over a subset of data. Animation made in PowerPoint.
@@ -109,7 +109,7 @@ Below, we compute three different moving average filter window sizes: 5, 10, and
109109

110110
<!-- The object-oriented filtering approach makes it easy to test and compare the effect of different window sizes on the filtered output. -->
111111

112-
<video autoplay loop muted playsinline>
112+
<video aria-label="Raw analog input (blue) graphed alongside moving average filter output for three window sizes: 5 (red), 10 (green), and 20 (yellow), in the Arduino Serial Plotter" autoplay loop muted playsinline>
113113
<source src="assets/videos/MovingAverageWithThreeWindowSizes-Optimized.mp4" type="video/mp4" />
114114
</video>
115115
**Video** This video graphs raw analog input (blue) and filtered output from three different moving average window sizes: 5 (red line), 10 (green), and 20 (yellow). To produce this video, we used [this code](https://github.com/makeabilitylab/arduino/blob/master/Filters/MovingAverageFilterWindowSizeDemo/MovingAverageFilterWindowSizeDemo.ino) and the [Arduino Serial Plotter](https://diyrobocars.com/2020/05/04/arduino-serial-plotter-the-missing-manual/). You should [try it](https://github.com/makeabilitylab/arduino/blob/master/Filters/MovingAverageFilterWindowSizeDemo/MovingAverageFilterWindowSizeDemo.ino) yourself!
@@ -190,7 +190,7 @@ Below, we've included sample weights for both linear and exponential weighting s
190190

191191
| Linear Weights | Exponential Weights |
192192
|:----------------:|:-------------:|
193-
| ![](assets/images/WeightedMovingAverage_WindowSize15_Wikipedia.png) | ![](assets/images/ExponentialMovingAverageWeights_WindowSize15_Wikipedia.png) |
193+
| ![Bar chart of linearly decreasing weights across a moving average window of size 15](assets/images/WeightedMovingAverage_WindowSize15_Wikipedia.png) | ![Bar chart of exponentially decreasing weights across a moving average window of size 15](assets/images/ExponentialMovingAverageWeights_WindowSize15_Wikipedia.png) |
194194
| Linearly decreasing weights for window size 15 | Exponentially decreasing weights for window size 15|
195195

196196
**Figure.** Images from [Wikipedia](https://en.wikipedia.org/wiki/Moving_average).
@@ -217,7 +217,7 @@ Where:
217217

218218
The coefficient $$\alpha$$ determines the exponential dropoff. A higher $$\alpha$$ weights more recent data more. For example, the video below shows EWMA performance with $$\alpha$$ equal to 0.5 (red line), 0.1 (green line), and 0.01 (yellow line). Notice how closely the $$\alpha=0.5$$ EWMA filter tracks the underlying raw signal whereas the $$\alpha=0.01$$ filter is quite distorted and lagged. The $$\alpha=0.1$$ filter may still be appropriate, depending on your needs. Again, it's up to you to experiment!
219219

220-
<video autoplay loop muted playsinline>
220+
<video aria-label="Exponentially weighted moving average filter output for three alpha values: 0.5 (red) tracking the raw signal closely, 0.1 (green), and 0.01 (yellow) heavily distorted and lagged" autoplay loop muted playsinline>
221221
<source src="assets/videos/ExponentialMovingAverageFilter-ThreeAlphaValues-Optimized.mp4" type="video/mp4" />
222222
</video>
223223
**Video** This video shows EWMA performance with $$\alpha$$ equal to 0.5 (red line), 0.1 (green line), and 0.01 (yellow line). The code used to produce this video is [here](https://github.com/makeabilitylab/arduino/blob/master/Filters/EwmaFilterAlphaDemo/EwmaFilterAlphaDemo.ino). Graph made with the built-in [Arduino Serial Plotter](https://diyrobocars.com/2020/05/04/arduino-serial-plotter-the-missing-manual/).
@@ -264,7 +264,7 @@ void loop()
264264

265265
A **moving median filter** is almost the exact same as a [moving average filter](#moving-average-filter) but takes the **median** over the sliding window rather than the average.
266266

267-
<video autoplay loop muted playsinline>
267+
<video aria-label="An animation illustrating a moving median filter with a window size of three sliding over a signal to produce the smoothed output" autoplay loop muted playsinline>
268268
<source src="assets/videos/MovingMedianFilter_PowerPointAnimation_TrimmedAndCropped.mp4" type="video/mp4" />
269269
</video>
270270
**Video** This video shows a moving median filter with a window size of three. Animation made in PowerPoint.
@@ -295,7 +295,7 @@ But how can we obtain this "middle" value efficiently? We know that re-sorting a
295295

296296
Similar to the moving average filter, we can tweak the moving median filter's performance by modifying the filter window size. Below, we show a moving median filter with window sizes 5, 11, and 21. For this video, we used our test code [MovingMedianFilterWindowSizeDemo.ino](https://github.com/makeabilitylab/arduino/blob/master/Filters/MovingMedianFilterWindowSizeDemo/MovingMedianFilterWindowSizeDemo.ino), which relies on Luis Llama's [Arduino Median Filter 2](https://github.com/warhog/Arduino-MedianFilter) library based on Phil Ekstrom's "[Better Than Average](https://www.embedded.com/better-than-average/)" article.
297297

298-
<video autoplay loop muted playsinline>
298+
<video aria-label="Moving median filter output for window sizes 5, 11, and 21, showing how the median filter flattens peaks in the signal, graphed in the Arduino Serial Plotter" autoplay loop muted playsinline>
299299
<source src="assets/videos/MovingMedianFilter-ThreeWindowSizes-TrimmedAndOptimized.mp4" type="video/mp4" />
300300
</video>
301301
**Video** This video shows moving median filter performance with window sizes 5, 11, and 21. Notice how a median filter tends to flatten "peaks" in the signal, which is unlike the other filters we've examined. To make this video, we used [this code](https://github.com/makeabilitylab/arduino/blob/master/Filters/MovingMedianFilterWindowSizeDemo/MovingMedianFilterWindowSizeDemo.ino) and the built-in [Arduino Serial Plotter](https://diyrobocars.com/2020/05/04/arduino-serial-plotter-the-missing-manual/).
@@ -305,7 +305,7 @@ Similar to the moving average filter, we can tweak the moving median filter's pe
305305

306306
Median filters are widely used in image processing to remove noise from images (image processing is its own subfield of signal processing focusing on 2D DSP techniques). Unlike mean (or average) filters, median filters remove noise while preserving edges—and edges are often a crucial part of other image processing algorithms like the [Canny edge detector](https://en.wikipedia.org/wiki/Canny_edge_detector).
307307

308-
![](assets/images/Medianfilterp_Wikipedia.png)
308+
![A noisy image with salt-and-pepper speckle on the left and the same image after median filtering removes the noise while preserving edges on the right](assets/images/Medianfilterp_Wikipedia.png)
309309
{: .mx-auto .align-center }
310310

311311
**Figure**. Median filtering is widely used in image processing where it is particularly effective at removing "speckle" or "salt-and-pepper" noise while preserving edges. Image from [Wikipedia](https://en.wikipedia.org/wiki/Median_filter).
@@ -315,7 +315,7 @@ In the case of 1-dimensional signal processing, which we've focused on in this l
315315

316316
| Moving Average Filter | Moving Median Filter |
317317
|:----------------:|:-------------:|
318-
| ![](assets/images/SignalSmoothingExample_13-OriginalMovingAverageAndSavitzkyGolay_MathWorks.png) | ![](assets/images/SignalSmoothingExample_14-OriginalVsMedianFilter.png) |
318+
| ![Graph of a clock signal whose sharp rising and falling edges are distorted and rounded by a moving average filter](assets/images/SignalSmoothingExample_13-OriginalMovingAverageAndSavitzkyGolay_MathWorks.png) | ![Graph of a clock signal smoothed by a median filter that preserves and crispens the sharp transition edges](assets/images/SignalSmoothingExample_14-OriginalVsMedianFilter.png) |
319319
| The moving average filter distorts the rising and falling edges of the clock signal | The median filter both smooths the signal and crispens the clock transition edges |
320320

321321
**Figure.** Images from [MathWorks](https://www.mathworks.com/help/signal/ug/signal-smoothing.html).

arduino/led-blink3.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ This [source code](https://github.com/makeabilitylab/arduino/blob/master/Basics/
211211
#### Workbench video
212212

213213
<div class="iframe-container">
214-
<iframe src="https://www.youtube.com/embed/8DHhmXr3mC8" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
214+
<iframe title="Workbench video of an Arduino blinking multiple LEDs at different rates without using delay()" src="https://www.youtube.com/embed/8DHhmXr3mC8" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
215215
</div>
216216

217217
### Multi-rate blinking: an object-oriented approach
@@ -326,7 +326,7 @@ See the [code in our GitHub repository](https://github.com/makeabilitylab/arduin
326326
#### Workbench video
327327

328328
<div class="iframe-container">
329-
<iframe src="https://www.youtube.com/embed/vb5l8Tncedo" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
329+
<iframe title="Workbench video of multi-rate LED blinking using the Blinker class in external .h and .cpp files" src="https://www.youtube.com/embed/vb5l8Tncedo" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
330330
</div>
331331

332332
## Exercises

arduino/rgb-led-fade.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,13 @@ This [source code](https://github.com/makeabilitylab/arduino/blob/master/Basics/
147147
Here are two videos showing the code running on an Arduino Uno. First, in the Tinkercad simulator. You can see the crossfade colors and a plot of the corresponding `analogWrite` values.
148148

149149
<div class="iframe-container">
150-
<iframe src="https://www.youtube.com/embed/ZyfHRQFwmeg" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
150+
<iframe title="Tinkercad simulation of the RGB crossfader code with a plot of the corresponding analogWrite values" src="https://www.youtube.com/embed/ZyfHRQFwmeg" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
151151
</div>
152152

153153
Second, a workbench video of the code running on an Arduino Uno:
154154

155155
<div class="iframe-container">
156-
<iframe src="https://www.youtube.com/embed/zL7xIWHqVaY" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
156+
<iframe title="Workbench video of the RGB crossfader code running on an Arduino Uno" src="https://www.youtube.com/embed/zL7xIWHqVaY" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
157157
</div>
158158

159159
<!--TODO: add in a p5js that demonstrates how this works? And maybe let's reader play with different color values? -->
@@ -169,7 +169,7 @@ RGB and HSL color space visualizations from [Wikipedia](https://en.wikipedia.org
169169
Here's a video of various hues, saturations, and lightness levels using Hunor Marton's HSL Color Picker. Play around with it yourself on [codepen.io](https://codepen.io/HunorMarton/pen/dvXVvQ/). You can also open up almost any painting or graphics application to play with and switch between colorspaces from MSPaint to Adobe Photoshop and Illustrator to [GIMP](https://www.gimp.org/) and [Inkscape](https://inkscape.org/).
170170

171171
<div class="iframe-container">
172-
<iframe src="https://www.youtube.com/embed/a0j8qyBJE2E" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
172+
<iframe title="Screen recording of Hunor Marton's HSL Color Picker showing various hues, saturations, and lightness levels" src="https://www.youtube.com/embed/a0j8qyBJE2E" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
173173
</div>
174174
A screen recording of [Hunor Marton's HSL Color Picker](https://codepen.io/HunorMarton/pen/dvXVvQ/).
175175
{: .fs-1 }
@@ -225,7 +225,7 @@ This [source code](https://github.com/makeabilitylab/arduino/blob/master/Basics/
225225
Here's a workbench video of [CrossFadeHue.ino](https://github.com/makeabilitylab/arduino/tree/master/Basics/analogWrite/CrossFadeHue) with a common cathode RGB LED.
226226

227227
<div class="iframe-container">
228-
<iframe src="https://www.youtube.com/embed/ROfJge7bsfI" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
228+
<iframe title="Workbench video of the HSL-based RGB crossfader (CrossFadeHue.ino) running on a common cathode RGB LED" src="https://www.youtube.com/embed/ROfJge7bsfI" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
229229
</div>
230230

231231
<!-- TODO look up what the minimum step value that makes sense with our quantization -->

arduino/rgb-led.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,14 @@ That's it. Now compile, upload, and run your code!
185185
In the video below, I'm running our [BlinkRGB](https://github.com/makeabilitylab/arduino/tree/master/Basics/digitalWrite/BlinkRGB) code, which is the same as above but includes some [`Serial.print`](https://www.arduino.cc/reference/en/language/functions/communication/serial/print/) calls for debugging (see this [mini-tutorial](https://create.arduino.cc/projecthub/glowascii/serial-monitor-arduino-basics-399eb6) on using the Serial.print and the Arduino IDE's Serial Monitor for debugging)
186186

187187
<div class="iframe-container">
188-
<iframe src="https://www.youtube.com/embed/ASez28rPjRU" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
188+
<iframe title="Workbench video of the BlinkRGB code cycling a common cathode RGB LED through colors, diffused by a yogurt container" src="https://www.youtube.com/embed/ASez28rPjRU" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
189189
</div>
190190
The yogurt container is used to diffuse the light. Kleenex, white paper, or a ping pong ball (with a hole in it for the LED) works well too!
191191
{: .fs-1 }
192192

193193
Below, we show a video animation of the code executing and resulting circuit behavior. Pay close attention to the direction of current—it will flow in the opposite direction with the Common Anode design (covered next).
194194

195-
<video controls="controls">
195+
<video aria-label="Animation of a common cathode RGB LED circuit executing, showing the direction of current flow" controls="controls">
196196
<source src="assets/movies/Arduino_RGBLED_CommonCathode_Animation.mp4" type="video/mp4">
197197
</video>
198198

@@ -249,7 +249,7 @@ We will flash the same sequence as before but again our `HIGH`s and `LOW`s are f
249249

250250
Here's an animation. Pay close attention to the current direction—it flows from 5V down through the LED, the current limiting resistors, and into the digital I/O pins.
251251

252-
<video controls="controls">
252+
<video aria-label="Animation of a common anode RGB LED circuit with current flowing from 5V down through the LED and resistors into the digital I/O pins" controls="controls">
253253
<source src="assets/movies/Arduino_RGBLED_CommonAnode_Animation.mp4" type="video/mp4">
254254
</video>
255255

0 commit comments

Comments
 (0)