|
1 | | -= Grove Digital Inputs |
| 1 | += Grove Analog Outputs |
2 | 2 | :page-toclevels: 1 |
3 | 3 |
|
4 | | -.Overview |
5 | | -:page-toclevels: 2 |
6 | | -**** |
7 | | -This example uses the grove button module but the source code is also applicable for other similar Grove Modules. |
| 4 | +== Overview |
8 | 5 |
|
9 | | -The GPIO Pins used are [D16,D17],[D18,D19],[D20,D21] |
| 6 | +An analog output can be thought of as a way of generating a signal, the standard way this is done on a Pico is using a PWM square-wave. |
10 | 7 |
|
11 | | -image::general\GroveDigitalConnectionsPico.png[] |
| 8 | +The Connections used are [A0,NC],[A1,A2],[A2,A1] and these correspond to GPIO Pins A0=GPIO26, A1=GPIO27, A1=GPIO28 |
12 | 9 |
|
| 10 | +The connectors used are [A0],[A1],[A2] as shown below |
13 | 11 |
|
14 | | -**** |
| 12 | +image::GrovePicoShieldAnalogConnections.png[] |
15 | 13 |
|
16 | | -.Hardware Details |
17 | | -:page-toclevels: 2 |
18 | | -**** |
19 | | -https://wiki.seeedstudio.com/Grove-Dual-Button/#features[Grove Dual Button] |
20 | | -**** |
| 14 | +* xref:grove-analog-inputs.adoc[Grove Analog Outputs] |
21 | 15 |
|
22 | | -.Demo Video |
23 | | -:page-toclevels: 2 |
24 | | -**** |
25 | | -Here is a video that shows the set-up and running of the Dual Button Digital Inputs |
| 16 | +There are also options that communicate using I2C. These will use connectors I2C0 and I2C1 as shown. Commonly these will offer improved resolution e.g. 16 bits so 65536 levels. They may also offer amplifiers, multiplexers or other enhanced functionality. |
26 | 17 |
|
27 | | -video::0-suR8HejsY[youtube] |
| 18 | +image::GrovePicoShieldI2CConnection.png[] |
28 | 19 |
|
29 | | -**** |
30 | | -
|
31 | | -.Example Code |
32 | | -:page-toclevels: 2 |
33 | | -**** |
34 | | -Navigate to >>Scratchpad>>Grove>>Digital Inputs>>Grove Digital In.vi |
35 | | - |
36 | | -image::images\grove-digital-inputs\GroveDigitalInProject.png[] |
37 | | - |
38 | | -This particular VI uses the dual buttons. Select the port for the connected Pico and the Grove connector that the board is plugged into. Press the run arrow. |
39 | | - |
40 | | -You should now see the button indicators light up when the corresponding button is pressed. The Indicators use a transparent fill for the off state and a brighter Red or Green for the on state. |
41 | | - |
42 | | -Links to various other similar boards are also on the Front Panel. |
43 | | - |
44 | | -image::images\grove-digital-inputs\GroveDigitalInFP.png[] |
45 | | - |
46 | | -On the block diagram you can see that the selected Grove connector dictates the GPIO Pin and we then set the pin to [In]. Next we loop round and event structure and use the timeout to poll the digital inputs. Pressing Stop will fire the Stop event and exit the loop. |
47 | | - |
48 | | -image::images\grove-digital-inputs\GroveDigitalInBD.png[] |
49 | | -**** |
| 20 | +* xref:grove-i2c-M5StackDAC2-An-Out.adoc[M5 Stack DAC 2 Channel An Out] |
0 commit comments