Skip to content

Commit c660d49

Browse files
committed
Updated M5Stack DAC2 and made some corrections
1 parent aa5bfb2 commit c660d49

File tree

6 files changed

+28
-33
lines changed

6 files changed

+28
-33
lines changed
42.1 KB
Loading
73.4 KB
Loading
40.9 KB
Loading

www/en/modules/ROOT/pages/analog-outputs-nav.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The connectors used are [A0],[A1],[A2] as shown below
1111

1212
image::GrovePicoShieldAnalogConnections.png[]
1313

14-
* xref:grove-analog-inputs.adoc[Grove Analog Outputs]
14+
* xref:grove-analog-outputs-pwm.adoc[Grove Analog Outputs PWM]
1515

1616
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.
1717

Lines changed: 24 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,43 @@
1-
= Grove Digital Inputs
1+
= M5Stack DAC2 I2C Analog Outputs
22
:page-toclevels: 1
33

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
85

9-
The GPIO Pins used are [D16,D17],[D18,D19],[D20,D21]
6+
This example uses the M5Stack DAC 2 Module, there are other similar modules that may work with this code as it uses the GP8313 integrated circuit. These are Grove compatible modules.
107

11-
image::general\GroveDigitalConnectionsPico.png[]
8+
The GPIO Pins used are [I2C0] or [I2C1]
129

10+
image::GrovePicoShieldI2CConnection.png[]
1311

14-
****
1512

16-
.Hardware Details
17-
:page-toclevels: 2
18-
****
19-
https://wiki.seeedstudio.com/Grove-Dual-Button/#features[Grove Dual Button]
20-
****
13+
== Hardware Details
2114

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
15+
https://shop.m5stack.com/products/dac-2-i2c-unit-gp8413[M5Stack DAC2 Module]
16+
17+
https://cdn.robotshop.com/media/M/Mst/RB-Mst-408/pdf/dac-2-i2c-unit-gp8413-schematics.pdf?_gl=1*1iloh40*_ga*OTI2MTgwMTk0LjE3NzIzODcwOTY.*_ga_FXHVC4EYRV*czE3NzIzODcwOTMkbzEkZzAkdDE3NzIzODcwOTkkajYwJGwwJGgw*_gcl_au*MTI3MDM0MTE5OC4xNzcyMzg3MTAw[Schematic]
18+
19+
https://www.dfrobot.com/product-2756.html[DFRobot boards may also work]
20+
21+
== Demo Video
22+
23+
Here is a video that shows the set-up and running of the M5Stack DAC2
2624

2725
video::0-suR8HejsY[youtube]
2826

29-
****
3027

31-
.Example Code
32-
:page-toclevels: 2
33-
****
34-
Navigate to >>Scratchpad>>Grove>>Digital Inputs>>Grove Digital In.vi
28+
== Example Code
29+
30+
Navigate to >>Scratchpad>>Grove>>Analog Outputs>>**I2C An Out M5StackDAC2.vi**
31+
32+
image::M5StackDAC2AnalogOutputProject.png[]
3533

36-
image::images\grove-digital-inputs\GroveDigitalInProject.png[]
34+
This particular VI uses the M5Stack DAC2 and this gives us 2 channels of 16 bit Analog Output. Select the port for the connected Pico and the Grove connector that the board is plugged into. Press the run arrow.
3735

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.
3936

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.
4137

42-
Links to various other similar boards are also on the Front Panel.
4338

44-
image::images\grove-digital-inputs\GroveDigitalInFP.png[]
39+
image::M5StackDAC2AnalogOutputFP.png[]
4540

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.
41+
On the block diagram you can see that the selected Grove connector dictates the GPIO Pin for the IC2 Port. We set up the IC2 port for the device in **Init.vi**. Next we loop round the event structure and wait for a Sliders V0 or V1 to be changed. When change has been detected the new values are input into the **Write DAC.vi**. Pressing Stop will fire the Stop event and exit the loop.
4742

48-
image::images\grove-digital-inputs\GroveDigitalInBD.png[]
49-
****
43+
image::M5StackDAC2AnalogOutputBD.png[]

www/en/modules/ROOT/pages/set-up.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66

77
* Raspberry Pi Pico 2040
88
** https://thepihut.com/products/raspberry-pi-pico[Pihut UK]
9-
** https://uk.farnell.com/raspberry-pi/raspberry-pi-pico/mcu-board-rpi-pico-264kb-133mhz/dp/3643332[Farnell UK]
9+
** https://uk.farnell.com/raspberry-pi/raspberry-pi-pico/mcu-board-rpi-pico-264kb-133mhz/dp/3643332[Farnell UK]#
10+
1011
* Radxa X4
11-
** https://thepihut.com/products/raspberry-pi-pico[Pihut UK]
12+
** https://radxa.com/products/x/x4/[Radxa]
1213

1314

1415

0 commit comments

Comments
 (0)