|
1 | | -= Grove Digital Inputs |
| 1 | += What is Grove |
2 | 2 | :page-toclevels: 1 |
3 | 3 |
|
4 | 4 | .Overview |
5 | 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. |
8 | 6 |
|
9 | | -The GPIO Pins used are [D16,D17],[D18,D19],[D20,D21] |
| 7 | +Grove is an inexpensive connection system for hobbyist micro-controllers (Pico, RPi and Arduino) and comes with a whole eco-system of boards and hats. This makes it very convenient for trainers and hobbyist engineers. |
10 | 8 |
|
11 | | -image::general\GroveDigitalConnectionsPico.png[] |
| 9 | +https://wiki.seeedstudio.com/Grove_System/[SEEED Grove Website] |
12 | 10 |
|
| 11 | +.Digital Connectors |
| 12 | +:page-toclevels: 3 |
| 13 | +image::GroveDigitalConnection.png[] |
13 | 14 |
|
14 | | -**** |
| 15 | +Connectors D16,D18,D20 are used for our examples and are wired as shown in Figure 1 |
15 | 16 |
|
16 | | -.Hardware Details |
17 | | -:page-toclevels: 2 |
18 | | -**** |
19 | | -https://wiki.seeedstudio.com/Grove-Dual-Button/#features[Grove Dual Button] |
20 | | -**** |
21 | | - |
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 |
26 | | - |
27 | | -video::0-suR8HejsY[youtube] |
28 | | - |
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. |
| 17 | +.Analog Connectors |
| 18 | +:page-toclevels: 3 |
| 19 | +image::GroveAnalogConnection.png[] |
39 | 20 |
|
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. |
| 21 | +Connectors A0,A1,A2 are used for our examples and are wired similar to Figure 2 |
41 | 22 |
|
42 | | -Links to various other similar boards are also on the Front Panel. |
| 23 | +.UART Connectors |
| 24 | +:page-toclevels: 3 |
| 25 | +image::GroveUARTConnection.png[] |
43 | 26 |
|
44 | | -image::images\grove-digital-inputs\GroveDigitalInFP.png[] |
| 27 | +Connectors UART0 and UART1 are used for our examples and are wired as shown in Figure 3 |
45 | 28 |
|
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. |
| 29 | +.I2C Connectors |
| 30 | +:page-toclevels: 3 |
| 31 | +image::GroveI2CConnection.png[] |
47 | 32 |
|
48 | | -image::images\grove-digital-inputs\GroveDigitalInBD.png[] |
49 | | -**** |
| 33 | +Connectors I2C0 and I2C1 are used for our examples and are wired as shown in Figure 4 |
0 commit comments