Go Down

Topic: SD card remove/reinstert button (Read 416 times) previous topic - next topic


Hello, i read many topics and i made a solution for my problem but I'm no sure this is a good practice.

I have data logger, which should be atleast 10 hour a day. I'll be writing maybe every minute.
Then if I wanna remove the sd card i will press a button which will call ISR function, which will call another function to close(.close()) the file.

Then I want to insert back. I will press another button and call other ISR function, which will call another function to open the file and write again..

I'm using nodemcu8266.


I do not see the need for an interrupt. Your loop() can happily poll the button and close the file if a button change from non-pressed to pressed is detected.

Same for the opening button.
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

Go Up