diff --git a/Template Project/.vscode/settings.json b/Template Project/.vscode/settings.json index ef8ef5e..9de6690 100644 --- a/Template Project/.vscode/settings.json +++ b/Template Project/.vscode/settings.json @@ -10,5 +10,6 @@ "initializer_list": "cpp", "adafruit_ads1x15.h": "c" }, - "cmake.configureOnOpen": true + "cmake.configureOnOpen": true, + "cmake.sourceDirectory": "D:/Git/ESPMegaPRO-v3-SDK/Template Project/.pio/libdeps/wt32-eth01/Adafruit BusIO" } \ No newline at end of file diff --git a/Template Project/src/analogdemo.cpp b/Template Project/src/analogdemo.cpp new file mode 100644 index 0000000..a796b6e --- /dev/null +++ b/Template Project/src/analogdemo.cpp @@ -0,0 +1,16 @@ +#include + +void setup() +{ + Serial.begin(115200); + ESPMega_begin(); +} + +void loop() +{ + for(int i=0;i<4096;i++) { + ESPMega_dacWrite(0,i); + double dac_val_sine = 2047.5*sin(i*2*PI/2047.5)+2047.5; + ESPMega_dacWrite(1,(int)dac_val_sine); + } +} \ No newline at end of file diff --git a/Template Project/src/analogdemo.cpp.disabled b/Template Project/src/analogdemo.cpp.disabled deleted file mode 100644 index 2ae38a2..0000000 --- a/Template Project/src/analogdemo.cpp.disabled +++ /dev/null @@ -1,14 +0,0 @@ -#include - -void setup() -{ - Serial.begin(115200); - ESPMega_begin(); - ESPMega_dacWrite(0,2000); - ESPMega_dacWrite(1,2000); -} - -void loop() -{ - delay(100); -} \ No newline at end of file diff --git a/Template Project/src/fram_demo.cpp b/Template Project/src/fram_demo.cpp.disabled similarity index 100% rename from Template Project/src/fram_demo.cpp rename to Template Project/src/fram_demo.cpp.disabled