Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/chips-api/tutorial-7seg.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ typedef struct {
Next, add the following code to `chip_init` (after the line that defines `chip`):
```C
chip->segment_pins[0] = pin_init("SEG_A", OUTPUT_HIGH);
chip->segment_pins[0] = pin_init("SEG_B", OUTPUT_HIGH);
chip->segment_pins[0] = pin_init("SEG_C", OUTPUT_HIGH);
chip->segment_pins[0] = pin_init("SEG_D", OUTPUT_HIGH);
chip->segment_pins[0] = pin_init("SEG_E", OUTPUT_HIGH);
chip->segment_pins[0] = pin_init("SEG_F", OUTPUT_HIGH);
chip->segment_pins[0] = pin_init("SEG_G", OUTPUT_HIGH);
chip->segment_pins[1] = pin_init("SEG_B", OUTPUT_HIGH);
chip->segment_pins[2] = pin_init("SEG_C", OUTPUT_HIGH);
chip->segment_pins[3] = pin_init("SEG_D", OUTPUT_HIGH);
chip->segment_pins[4] = pin_init("SEG_E", OUTPUT_HIGH);
chip->segment_pins[5] = pin_init("SEG_F", OUTPUT_HIGH);
chip->segment_pins[6] = pin_init("SEG_G", OUTPUT_HIGH);
```

The code initializes each of the segment pins as an output, and sets the initial value to digital high. The 7-segment
Expand Down Expand Up @@ -259,4 +259,4 @@ tutorial:
compiles the chips and creates a release whenever you push a tag.

Here's an [example for a Wokwi project](https://wokwi.com/projects/350946636543820370) that uses this chip. Note the
"dependencies" section in `diagram.json` - it tells Wokwi where to look for the chip implementation on GitHub.
"dependencies" section in `diagram.json` - it tells Wokwi where to look for the chip implementation on GitHub.