Skip to content

Commit 21622fc

Browse files
authored
Remove apostrophes and fix a typo (raspberrypi#196)
1 parent cba82df commit 21622fc

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

gpio/hello_7segment/README.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ Our 7 Segment display has pins as follows.
1414
--D--
1515
----
1616

17-
By default we are allocating GPIO 2 to A, 3 to B etc.
17+
By default we are allocating GPIO 2 to segment A, 3 to B etc.
1818
So, connect GPIO 2 to pin A on the 7 segment LED display and so on. You will need the appropriate resistors (68 ohm should be fine) for each segment.
19-
The LED device used here is common anode, so the anode pin is connected to the 3.3v supply, and the GPIO's need to pull low (to ground) to complete the circuit.
20-
The pull direction of the GPIO's is specified in the code itself.
19+
The LED device used here is common anode, so the anode pin is connected to the 3.3v supply, and the GPIOs need to pull low (to ground) to complete the circuit.
20+
The pull direction of the GPIOs is specified in the code itself.
2121

2222
Connect the switch to connect on pressing. One side should be connected to ground, the other to GPIO 9.
2323

gpio/hello_7segment/hello_7segment.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
E C
1818
--D--
1919
20-
By default we are allocating GPIO 2 to A, 3 to B etc.
21-
So, connect GOIP 2 to pin A on the 7 segment LED display etc. Don't forget
20+
By default we are allocating GPIO 2 to segment A, 3 to B etc.
21+
So, connect GPIO 2 to pin A on the 7 segment LED display etc. Don't forget
2222
the appropriate resistors, best to use one for each segment!
2323
2424
Connect button so that pressing the switch connects the GPIO 9 (default) to
@@ -28,7 +28,7 @@
2828
#define FIRST_GPIO 2
2929
#define BUTTON_GPIO (FIRST_GPIO+7)
3030

31-
// This array converts a number 0-9 to a bit pattern to send to the GPIO's
31+
// This array converts a number 0-9 to a bit pattern to send to the GPIOs
3232
int bits[10] = {
3333
0x3f, // 0
3434
0x06, // 1
@@ -83,7 +83,7 @@ int main() {
8383
// We are starting with GPIO 2, our bitmap starts at bit 0 so shift to start at 2.
8484
int32_t mask = bits[val] << FIRST_GPIO;
8585

86-
// Set all our GPIO's in one go!
86+
// Set all our GPIOs in one go!
8787
// If something else is using GPIO, we might want to use gpio_put_masked()
8888
gpio_set_mask(mask);
8989
sleep_ms(250);

0 commit comments

Comments
 (0)