m5stack / M5Unified

Unified library for M5Stack series
MIT License
301 stars 54 forks source link

ADC cannot be used with M5Unified and Arduino3.0.4 #121

Open tanakamasayuki opened 1 month ago

tanakamasayuki commented 1 month ago
#include <M5Unified.h>

void setup() {
  auto cfg = M5.config();
  M5.begin(cfg);
  analogReadResolution(12);
}

void loop() {
  M5.delay(1000);
  M5.Log.println("loop");
}

Hang up at analogReadResolution().

E (119) ADC: CONFLICT! driver_ng is not allowed to be used with the legacy driver

This error occurred. Therefore, I will use Arduino2.x.

lovyan03 commented 1 month ago

@tanakamasayuki Thank you for reporting this. We will be fixing the code that relies on legacy drivers such as ADC and I2S.