Troubleshooting ADC Configuration for Sensor Data Acquisition on AVR128DA48 with Zephyr OS
hey guys on my Smart Industrial Monitoring System project, I've connected a vibration sensor (MPU6050) and temperature sensor (DS18B20) to the AVR128DA48. I'm using Zephyr OS, and I've configured the ADC for reading the sensor data. Below is the code I'm using to initialize the ADC for reading sensor data:
However, I'm getting
However, I'm getting
no readings from the sensors. What could be wrong with my ADC configuration, and how can I ensure correct sensor data acquisition?Solution
Do you have the correct ADC device name, we make mistakes like this attimes . In the Zephyr OS, the ADC device names may vary depending on the hardware you're using. Instead of "ADC_0", check your board’s device tree for the correct device name. Print out the available devices with:
Just make sure you reference the correct node label for your device
Just make sure you reference the correct node label for your device