Why isn't my LED responding to pressure readings in AVR128DA48 project?
hey guys, In my ongoing project on real-time pressure monitoring using the AVR128DA48 microcontroller, I’ve set up an alert system that triggers an LED to blink when the pressure exceeds a certain threshold. However, the LED doesn't seem to respond correctly to the pressure values, I have tested the LED separately to ensure it is functioning, verified that the BMP280 sensor is returning valid pressure readings, and also checked the GPIO pin configuration for the LED, yet still fails to respond correctly to the pressure readings, even when the threshold is crossed.
this is my code below:
What might be causing this issue, and how can I ensure the LED correctly responds to pressure values?
this is my code below:
What might be causing this issue, and how can I ensure the LED correctly responds to pressure values?
Solution
Yea thankz @Marvee Amasi I checked the issue was coming from my comparison of the pressure values...I had to use a single unit for it, both for the integer and fractional values..thanks for pointing out