#include <Arduino.h>
#include "mix.h"
MIX x;
void setup() {
// put your setup code here, to run once:
int a =100;
Serial.begin(115200);
Serial.printf("Hello, ESP32! %d\n",a);
Serial.print("Total Heap Size: ");
Serial.print(ESP.getHeapSize());
Serial.println(" Bytes");
Serial.print("Free Heap Size: ");
Serial.print(ESP.getFreeHeap());
Serial.println(" Bytes");
Serial.println("");
x.show();
x.setGain(3,2);
Serial.println("Task is done~~~~~~~~~~~~");
Serial.print("Free Heap Size: ");
Serial.print(ESP.getFreeHeap());
Serial.println(" Bytes");
Serial.println("");
size_t i2s_bytes_write = 0;
Serial.printf("Size is %zd\n",i2s_bytes_write);
}
void loop() {
int aData=analogRead(4);
uint8_t t_switch = map(aData, 0, 4095, 0, 9);
Serial.printf("AnalogRead Vol: %d,T_Switch vol : %d\n",aData,t_switch);
delay(2000); // this speeds up the simulation
}