![]() Please note that when the Arduino is started, it is checked whether a file named “file.txt” exists (see setup function). At the end of the loop function, a delay of 5 seconds is added. ![]() In particular, the number is written to a file named “file.txt”. In this tutorial’s code, a random number between 0 and 9 is written to an SD card. If something does not work as expected, a good start for debugging is always to upload CardInfo example of the library (File -> Examples -> SD -> CardInfo) to the Arduino and read the messages of the serial monitor. Moreover, the SD card must be formatted as FAT16 or FAT32. Fortunately, version 1.1.1 did work without any problems. For example, in my case, version 1.1.0 did not work with the module. Make sure to use the latest version of the SD library (Sketch -> Include Library -> Manage Libraries -> Search for “SD”). MicroSD Card Adapter Pin –> Arduino Uno Pin:Īs mentioned before, reading and writing an SD card is very simple when the standard SD library of the Arduino IDE is used. The following table shows the complete pin layout. The module communicates via SPI (Serial Peripheral Interface) to the Arduino Uno. Therefore, the Arduino’s 5V and 3.3V pin can be used for the voltage supply. The module comes with a voltage regulator.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |