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
Copy file name to clipboardExpand all lines: content/hardware/08.mega/boards/giga-r1/tutorials/cheat-sheet/cheat-sheet.md
+13-13Lines changed: 13 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -151,37 +151,37 @@ Include the library and setup the DAC with the following code in the beginning o
151
151
```arduino
152
152
#include "AdvancedDAC.h"
153
153
154
-
AdvancedDAC dac(A12);
154
+
AdvancedDAC dac1(A12);
155
155
156
156
```
157
157
158
158
Then, initialize the library, and check that everything went as expected with the following piece of code:
159
159
160
160
```arduino
161
-
if (!dac.begin(AN_RESOLUTION_12, 8000, 32, 64)) {
161
+
if (!dac1.begin(AN_RESOLUTION_12, 8000, 32, 64)) {
162
162
Serial.println("Failed to start DAC!");
163
163
while (1);
164
164
}
165
165
```
166
166
167
167
Then lastly, add the following code to `void loop()` to start:
168
168
```arduino
169
-
if (dac.available()) {
169
+
if (dac1.available()) {
170
170
171
171
// Get a free buffer for writing
172
-
SampleBuffer buf = dac.dequeue();
172
+
SampleBuffer buf = dac1.dequeue();
173
173
174
174
// Write data to buffer
175
175
for (int i=0; i<buf.size(); i++) {
176
176
buf.data()[i] = (i % 2 == 0) ? 0: 0xfff;
177
177
}
178
178
179
179
// Write the buffer data to DAC
180
-
dac.write(buf);
180
+
dac1.write(buf);
181
181
}
182
182
```
183
183
184
-
The options for audio playback and generation on your Arduino GIGA R1 are **much** more vast than this, however. To learn about audio playback in depth, check out the [audio guide](../giga-audio/content.md).
184
+
The options for audio playback and generation on your Arduino GIGA R1 are **much** more vast than this, however. To learn about audio playback in depth, check out the [GIGA R1 Audio Guide](/tutorials/giga-r1/giga-audio).
185
185
186
186
### Input
187
187
The audio jack on the Arduino GIGA R1 is not just connected to the DAC pins, however, but are also connected to pin A7, for microphone capabilities.
@@ -191,7 +191,7 @@ To take advantage of this, you can use the `AdvancedAnalogRedux` library from Ar
191
191
```arduino
192
192
#include "AdvancedADC.h"
193
193
194
-
AdvancedADC adc(A7);
194
+
AdvancedADC adc1(A7);
195
195
```
196
196
197
197
Now, initialise the library and run a check to make sure everything went as expected with the following code within `void setup()`:
@@ -200,15 +200,15 @@ Now, initialise the library and run a check to make sure everything went as expe
200
200
Serial.begin(9600);
201
201
202
202
// Resolution, sample rate, number of samples per channel, and queue depth of the ADC
203
-
if (!adc.begin(AN_RESOLUTION_16, 16000, 32, 64)) {
203
+
if (!adc1.begin(AN_RESOLUTION_16, 16000, 32, 64)) {
204
204
Serial.println("Failed to start analog acquisition!");
205
205
while (1);
206
206
}
207
207
```
208
208
Finally, read the ADC, and store it in a way that you can use it, do this within `void loop()`:
209
209
```arduino
210
-
if (adc.available()) {
211
-
SampleBuffer buf = adc.read();
210
+
if (adc1.available()) {
211
+
SampleBuffer buf = adc1.read();
212
212
213
213
// Print first sample
214
214
Serial.println(buf[0]);
@@ -217,7 +217,7 @@ Finally, read the ADC, and store it in a way that you can use it, do this within
217
217
buf.release();
218
218
```
219
219
220
-
The options for audio input on your Arduino GIGA R1 are **much** more vast than this, however. To learn about audio recording in depth, check out the [audio guide](../giga-audio/content.md).
220
+
The options for audio input on your Arduino GIGA R1 are **much** more vast than this, however. To learn about audio recording in depth, check out the [GIGA R1 Audio Guide](/tutorials/giga-r1/giga-audio).
221
221
222
222
## MIPI Display Interface
223
223
The **STM32H747XI** has an internal 2D graphics accelerator with support for resolutions up to 1024x768, it also has the ability to encode and decode JPEG codec. This is what allows the **Arduino GIGA R1** to boast a 2 lane MIPI display interface.
@@ -236,7 +236,7 @@ There are several libraries you can use for the USBHost capabilities of the Ardu
236
236
237
237
Some of these libraries are built in to the core and therefore you won't be required to download them separately.
238
238
239
-
To learn in depth about how to use these powerful features, read the [USBHost Guide](../giga-usb/giga-usb.md) that contains in-depth walkthroughs for each of them.
239
+
To learn in depth about how to use these powerful features, read the [GIGA R1 USBHost Guide](/tutorials/giga-r1/giga-usb) that contains in-depth walkthroughs for each of them.
240
240
241
241
## RTC
242
242
@@ -294,7 +294,7 @@ The Arduino GIGA features an onboard arducam compatible connector, with support
294
294
295
295
Programming the board in the **MicroPython** language using the **OpenMV IDE** easily lets you get started with a neural network analysing a realtime camera feed with ML.
296
296
297
-
To learn more about the camera capabilities of the Arduino GIGA R1, check out the [GIGA Camera Guide](../giga-camera/giga-camera.md)
297
+
To learn more about the camera capabilities of the Arduino GIGA R1, check out the [GIGA R1 Camera Guide](/tutorials/giga-r1/giga-camera)
298
298
299
299
## JTAG
300
300
The **Arduino GIGA R1** features a 2x5 pin JTAG (Joint Test Action Group) connector, giving advanced debug functionalities for more advanced users.
0 commit comments