You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you want to build something using a Raspberry Pi, you'll probably use _resistors_.
4
4
For this exercise, you need to know two things about them:
5
5
6
-
* Each resistor has a resistance value.
7
-
* Resistors are small - so small in fact that if you printed the resistance value on them, it would be hard to read.
6
+
- Each resistor has a resistance value.
7
+
- Resistors are small - so small in fact that if you printed the resistance value on them, it would be hard to read.
8
8
9
9
To get around this problem, manufacturers print color-coded bands onto the resistors to denote their resistance values.
10
10
Each band has a position and a numeric value.
@@ -15,21 +15,25 @@ In this exercise you are going to create a helpful program so that you don't hav
15
15
16
16
These colors are encoded as follows:
17
17
18
-
-Black: 0
19
-
-Brown: 1
20
-
-Red: 2
21
-
-Orange: 3
22
-
-Yellow: 4
23
-
-Green: 5
24
-
-Blue: 6
25
-
-Violet: 7
26
-
-Grey: 8
27
-
-White: 9
18
+
-black: 0
19
+
-brown: 1
20
+
-red: 2
21
+
-orange: 3
22
+
-yellow: 4
23
+
-green: 5
24
+
-blue: 6
25
+
-violet: 7
26
+
-grey: 8
27
+
-white: 9
28
28
29
29
The goal of this exercise is to create a way:
30
+
30
31
- to look up the numerical value associated with a particular color band
31
32
- to list the different band colors
32
33
33
-
Mnemonics map the colors to the numbers, that, when stored as an array, happen to map to their index in the array: Better Be Right Or Your Great Big Values Go Wrong.
34
+
Mnemonics map the colors to the numbers, that, when stored as an array, happen to map to their index in the array:
35
+
Better Be Right Or Your Great Big Values Go Wrong.
36
+
37
+
More information on the color encoding of resistors can be found in the [Electronic color code Wikipedia article][e-color-code].
34
38
35
-
More information on the color encoding of resistors can be found in the [Electronic colorcode Wikipedia article](https://en.wikipedia.org/wiki/Electronic_color_code)
0 commit comments