Sorry for not including necessary documentation in my post.
Here are some links for the Maixduino board:
https://maixduino.sipeed.com/en/get_started/install.html
I tried to read a Value from an LDR via analog Pin A0. It worked perfectly fine in my other arduino boards(arduino due, arduino uno) but when I tried to connect it to Maixduino it always reads '0'. Hence if I change it to anlaogPin3 it reads 3, if I write analogRead(A33) it reads 33. There is most probably a problem that I am dismissing because I can do anything else with the board other than "analogRead()".
Here is the code:
#define LDRPIN A0
int LDRVal;
void setup() {
// put your setup code here, to run once:
pinMode(LDRPIN, INPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
LDRVal = analogRead(LDRPIN);
delay(50);
Serial.println(LDRVal);
}
I couldn't upload the schematics of the circuit since there was a problem with it. But it is just basically similar to the sketch here: https://create.arduino.cc/projecthub/SBR/working-with-light-dependent-resistor-ldr-1ded4f with the only difference being that there is a Maixduino instead of an Arduino.
I also know that this board can be programmed with micropython but I have no experience in programming with micropyhton therefore it wouldn't be useful for my project.