@felmue
Then I need to change design... thank you so much for answer.
K
Latest posts made by kazyam53
-
RE: M5stack BASIC v2.6 GPIO16 input problem
-
M5stack BASIC v2.6 GPIO16 input problem
I want to use GPIO16 on M5stack basic v2.6 as digital input but it doesn't work.
I have tried on the code below but it always return 1.
・It's work well on M5 stack gray (default 0, when input 3.3V it return 1).
・In case I use GPIO17,25,26, it can also work well.
・I have 2 of basic v2.6 but both of them have same issue.This is the code I have tested.
#include "Wire.h" #include <M5Stack.h> #define DIN 16 void setup() { //start serial connection M5.begin(); M5.Power.begin(); Wire.begin(); Serial.begin(9600); pinMode(DIN, INPUT_PULLDOWN); } void loop() { int sensorVal = digitalRead(DIN); Serial.println(sensorVal); }
Do you have any solution or find issue on my code?
Thank you in advance for your help.