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
Built-in button functionality is not yet supported.
179
203
204
+
See [the example](Examples/Components/RotartEncoder/Program.cs) for more details.
205
+
180
206
### Seven-Segment Display
181
207
182
208
Seven-segment displays are currently supported for direct connections to GPIO pins (support for shift register input coming soon) and can be passed a character (all ASCII letters, numbers, and several other symbols)
@@ -219,6 +245,34 @@ var custom = new PowerSet
219
245
display.SetPowerValues(custom);
220
246
```
221
247
248
+
See [the example](Examples/Components/SevenSegmentDisplay/Program.cs) for more details.
249
+
250
+
### Dot Matrix Display
251
+
252
+
The dot matrix display required 16 inputs, one for each row and one for each column. Like the seven segment display, these are initialized via a `PinSet`, with pins numbered counter-clockwise starting from the bottom left:
You can then set rows or columns individually or all together:
266
+
```C#
267
+
matrix.SetAllRows(PowerValue.On);
268
+
matrix.SetAllColumns(PowerValue.Off);
269
+
270
+
matrix.SetRows(newDotMatrix.PowerSet { ... });
271
+
matrix.SetColumns(newDotMatrix.PowerSet { ... });
272
+
```
273
+
274
+
See [the example](Examples/Components/DotMatrix/Program.cs) for more details.
275
+
222
276
### Bidirectional Motor
223
277
224
278
The wiring required to safely run a motor is rather complicated. The code, however, can be quite eloquent. The `Motor` component assumes an L293D-compatible driver.
@@ -248,6 +302,8 @@ If using all 4 inputs on a single driver, declare another `Motor` to handle inpu
248
302
249
303
To drive a single-direction motor (by only having input 1 connected), simply pass `null` as the `counterclockwisePin` to the `Motor` constructor. Counterclockwise methods are not expected to function under this condition.
250
304
305
+
See [the example](Examples/Components/Motor/Program.cs) for more details.
306
+
251
307
### Shift Register
252
308
253
309
A shift register allows you to control more outputs than you have inputs. The `ShiftRegister` component abstracts the implementation details of the 595-style integrated circuit away, so you can simply send the data you want as a `byte`!
@@ -288,6 +344,8 @@ outputPin.Spike();
288
344
289
345
Similar to the `Motor` component, the `enabled` and `clear` parameters are optional; if you choose to have the register always on/enabled by connecting it to the 3.3 or 5V rail, set the first param to `null`. If you never need to clear, and that pin is also connected to 3.3 or 5V, just leave the last param out.
290
346
347
+
See [the example](Examples/Components/ShiftRegister/Program.cs) for more details.
348
+
291
349
## "Wow, this is great! How can I help?"
292
350
293
351
First, thank you for your enthusiasm! I'd love feedback on how you felt using this. If you had an awesome experience, let me know on [Twitter](https://twitter.com/intent/tweet?text=.@stevedesmond_ca&hashtags=SimpleGPIO). If you had any problems, feel free to [file an issue](https://github.com/stevedesmond-ca/SimpleGPIO/issues/new).
0 commit comments