Hello, I am trying to use MAX32625PICO for the first time.
And trying to access analog input through “AnalogIn” API.
The compiler compiles the code without any error, and I can drag-and-drop the binary through usb.
But only thing that happens is the red LED flashes when unplugging and re-plugging the usb to run code, and green LED does not seem to turn on whatever an analog input.
My platform is Mbed Studio. And choose mbed os 5 when creating the project.
Here’s the actual code.
#include "mbed.h"
AnalogIn ain(AIN_0);
DigitalOut gLED(LED2, LED_OFF);
int main()
{
while (true)
{
float value = ain.read();
gLED = (value > 0.5f);
wait_us(10000);
}
}
Thank you.
This time I tried “Keil Studio” instead of “mbed studio”.
With Keil studio, the code below runs successfully without any error.
Maybe mbed studio still does not support MAX32625PICO?
#include "mbed.h"
#include "platform/mbed_thread.h"
int main() {
AnalogIn ain0(AIN_0);
DigitalOut rLED(LED1);
while (true) {
float value = ain0.read();
rLED = value > 0.5f;
thread_sleep_for((uint32_t)20);
}
}
I’ve used the MAX32630FTHR board which I believe it is very similar as the MAX32625PICO board. The blinky example for the Mbed OS 5.15.9 works fine with the Mbed Studio v1.45.
Please see the screenshot below.