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
Here is a video that shows the set-up and running of the Passive buzzer using a piano scale to demonstrate Frequency and Duty Cycle
28
+
29
+
video::0-suR8HejsY[youtube]
30
+
31
+
32
+
== Example Code
33
+
34
+
Navigate to >>Scratchpad>>Grove>>Analog Output PWM>>**Piano PWM AO.vi**
35
+
36
+
image::images\GroveAnalogOutputPWMProject.png[]
37
+
38
+
This particular VI uses the passive buzzer to make the sound. Select the port for the connected Pico and the Grove connector that the board is plugged into. Press the run arrow.
39
+
40
+
Links to various other similar boards are also on the Front Panel.
41
+
42
+
image::images\GroveAnalogOutPWMFP.png[]
43
+
44
+
On the block diagram you can see that the selected Grove connector dictates the GPIO Pin and we then wire it to the *Configure PWM.vi* . Next we loop round the event structure waiting for button press events. If a piano key is pressed the corresponding frequency will be entered into the *PWM Write Frequency.vi*. If the duty cycle is high enough a sound of the right key should be heard. Pressing Stop will fire the Stop event and exit the loop.
45
+
46
+
image::images\GroveAnalogOutPWMBD.png[]
47
+
48
+
49
+
15
50
16
51
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.
Copy file name to clipboardExpand all lines: www/en/modules/ROOT/pages/digital-outputs-nav.adoc
+10-13Lines changed: 10 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,28 +1,26 @@
1
1
= Grove Digital Outputs
2
2
:page-toclevels: 1
3
-
4
-
== Overview
3
+
== Standard Digital Output
4
+
=== Overview
5
5
6
6
A digital output can be thought of as the signal to an LED or a relay. These examples use the GPIO Pins [D16,D17],[D18,D19],[D20,D21] that correspond to connectors D16,D18 and D20 on the grove shield.
7
7
8
8
image::GroveDigitalConnectionsPico.png[]
9
9
10
-
* xref:grove-digital-outputs.adoc[Grove Digital Outputs]
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
34
40
35
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.
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.
0 commit comments