
Componentes del montaje
- Arduino Uno R4
- Potenciómetro de ajuste (Trim Pot)
- Resistencia (Resistor)
Cómo está conectado
- Arduino Uno R4 · 5v→Potenciómetro de ajuste (Trim Pot) · a
- Arduino Uno R4 · gnd2→Potenciómetro de ajuste (Trim Pot) · b
- Potenciómetro de ajuste (Trim Pot) · wiper→Arduino Uno R4 · a1
- Arduino Uno R4 · a0→Resistencia (Resistor) · a
- Resistencia (Resistor) · b→Arduino Uno R4 · gnd2
El código
Este sketch de Arduino C++ está en Code; inicia sesión y pulsa Compile & upload para compilar firmware real para la placa emulada.
// SPDX-License-Identifier: MIT // First-party UNO R4 example: A1 sets the amplitude of the A0 DAC sine. static const int16_t kSine[] = { 0, 399, 783, 1137, 1447, 1702, 1891, 2008, 2047, 2008, 1891, 1702, 1447, 1137, 783, 399, 0, -399, -783, -1137, -1447, -1702, -1891, -2008, -2047, -2008, -1891, -1702, -1447, -1137, -783, -399 }; void setup() { Serial.begin(115200); analogReadResolution(14); analogWriteResolution(12); } void loop() { const int level = analogRead(A1); Serial.print("adc14 "); Serial.println(level); for (int16_t sample : kSine) { const int code = 2048 + (int32_t)sample * level / 16383; analogWrite(DAC, code); delay(1); } }
Licencia del firmware (en inglés)
Notice: this firmware uses the LGPL-licensed Arduino core library
arduino-unor4wifi-analog-wave.bin is statically linked with ArduinoCore-renesas 1.6.0, in Breadboard's port of its UNO R4 WiFi variant to Renesas FSP 5.3.0. Parts of that core are licensed under the GNU Lesser General Public License, version 2.1 or (at your option) any later version ("the Library"). Breadboard distributes this firmware under terms that permit you to modify the work for your own use and to reverse engineer it for debugging such modifications.
- Relink package: arduino-unor4wifi-analog-wave-relink.zip (345 KB)
- Corresponding source: ArduinoCore-renesas-1.6.0-fsp53-source.zip (3.7 MB)
- Licence texts and relink instructions



