Closed timothyparez closed 2 years ago
Looking at M5Core2.cs I can see only 32
, 39
, 0
, 2
, 4
, 12
, 15
, 25
and 27
are allowed.
The M5Stack readme.md however shows an example with pin 35
:
ADC Channels are pre setup on the M5Core, M5Core2, Fire and Atom Lite/Matrix, access them like this:
// This will give you the ADC1 channel 7 which is on pin 35 of M5Core
AdcChannel myChannel = M5Core.GetAdcGpio(35);
On the back of the M5Core2 device the ADC pins are named G35
and G36
There are definitely some inconsistencies there (going by my board)
@timothyparez Feel free to create a PR.
Library/API/IoT binding
nanoFramework.M5Stack
Visual Studio version
No response
.NET nanoFramework extension version
No response
Target name(s)
M5Core2
Firmware version
No response
Device capabilities
ESP32 (ESP32-D0WDQ6-V3 (revision 3)) Features WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None Flash size 16MB unknown from ST (manufacturer 0x32 device 0x16408) PSRAM: undetermined Crystal 40MHz MAC 30:C6:F7:25:DE:28
Description
Following the samples in
readme.md
from https://github.com/nanoframework/nanoFramework.M5StackI am trying to read the value of an ADC pin.
As soon as I try to get an instance of
AdcChannel
an exception is thrown:System.ArgumentException: gpioNumber
How to reproduce
Expected behaviour
Expected to be able to read the ADC value
Screenshots
No response
Sample project or code
https://github.com/timothyparez/nanoframeworkadcissue
Aditional information