arduino - How to Save and display data SD card on LCD -


I am developing the system using Arduino Nano which will detect water disruption using photodiode sensor and LED. Now, I am trying to use the SD card module to save the data sensor.

I tried to use the following code in zero loop (), and it works, the file was created with the data value sensor at test.txt and Mymicro SD:

  count_save ++; If (count_save> 30) {count_save = 0; MyFile = SD.open ("Test.txt", FILE_WRITE); If (myfile) {lcd.clear (); Lcd.setCursor (0, 0); LCD Print ("Save Data"); MyFile.print ("Writing Data Sensor:"); MyFile.print (""); MyFile.print ("dirt ="); MyFile.print (photos); MyFile.close (); Delay (1000); } Else {lcd.clear (); Lcd.setCursor (0, 0); LCD Print ("save error"); Delay (1000); Lcd.clear (); }}}  

But in Myplan, I want to save the SD card from the data once I press the button, and when I press the button 2 it displays the data sensor on the LCD Will do

Please, help solve this problem ...

only Instead of looping, you must configure

IO as input, do not forget the pull-up / down.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -