led blinks for one sensor and glows for an other sensor

Hello,

I have arduino promini 3 V,
SD card breakout board from adafruit,
DS 3231 timer

I have used these and programmed in such a way that the microcontroller reads pressure from a pressure sensor (HSCDRRN400MD2A3)-3.3V writes data to SD card and while data is being written to the SD card, an led connected to pin 9 of the micro controller blinks continuously while data is being written.

Surprisingly, when I use a sensor DLVR-L60D -3.3 V , the microcontroller does exactly the same thing but this time the led doesnt blink . instead, it glows while the data is being written.

Can any one explain me why does the led blink for one sensor and glows for the other? both the pressure sensors use exactly the same amount of power supply. The pin out of both the sensors are also same.
The circuit is also the same. I just replace the pressure sensor.

I can post the codes for both the sensors and also the schematic if required.

Thank you

I can post the codes for both the sensors and also the schematic if required.

It is required.

The glowing led means it is being switched off and on very fast. The blinking led means it is being switched on and off slowly.
In one sketch, the serial prints which are in the led on off cycle are at 9600 baud, in the other at 115200.

Hello ,

I have changed the rates both to 115200 baud. but still, its the same.
While the data is being written to SD card ,it blinks for HSC sensor and glows constantly for DLVR sensor

The loop for the HSC sensor (where the data is written to the SD card ) contains a delay(20) statement.
If the loops are running at different speeds, you will see a difference in the behaviour of the "write active" leds.

If I remove the delay statement , the led doesnt glow at all .
but the data is till being written to the SD card

I have changed the delay to 6 and now it doesnt blink as rapidly as it used to. but still blinks. so is the only way to change the delay and check ?

dpoornima:
If I remove the delay statement , the led doesnt glow at all .
but the data is till being written to the SD card

If that is your goal to have a consistent blink rate for both sensors, then experiment with delay values (in both sensor sketches) until you achieve that.

Thanks a lot, I ll try doing that.

Hi,
Look in the IDE Examples for "Blink without Delay".

Tom... :slight_smile: