Yash Sanghvi has Published 220 Articles

List files stored in SD Card connected to Arduino

Yash Sanghvi

Yash Sanghvi

Updated on 29-May-2021 13:50:45

3K+ Views

As the title suggests, in this tutorial, we will be listing the files stored in an SD Card connected to Arduino.Circuit DiagramThe circuit diagram is shown below −As you can see, you need to make the following connections −SD Card HolderArduino UnoVcc5VGNDGNDMISO12MOSI11SCK13CS10Only for the Vcc, make sure that your SD ... Read More

Read a file from SD Card connected to Arduino

Yash Sanghvi

Yash Sanghvi

Updated on 29-May-2021 13:50:20

1K+ Views

As the title suggests, in this tutorial, we will read a file from an SD Card connected to Arduino.Circuit DiagramThe circuit diagram is shown below −As you can see, you need to make the following connections −SD Card HolderArduino UnoVcc5VGNDGNDMISO12MOSI11SCK13CS10Only for the Vcc, make sure that your SD Card Holder ... Read More

Append to an existing file stored in SD Card connected to Arduino

Yash Sanghvi

Yash Sanghvi

Updated on 29-May-2021 13:49:59

2K+ Views

In this tutorial, we will, as the title suggests, see how to append to a file in and SD Card connected to Arduino. Actually, it is quite simple. If you have gone through any previous articles on SD Card, then you only need to know thatmyFile = SD.open("example.txt", FILE_WRITE);opens example.txt ... Read More

Connect SD Card with Arduino and get Card Info

Yash Sanghvi

Yash Sanghvi

Updated on 29-May-2021 13:49:23

328 Views

In this tutorial, we will connect our Arduino Uno to an SD Card and extract the card info.Circuit DiagramThe circuit diagram is shown below −As you can see, you need to make the following connections −SD Card HolderArduino UnoVcc5VGNDGNDMISO12MOSI11SCK13CS10Only for the Vcc, make sure that your SD Card Holder takes ... Read More

Wait for user input to start a sketch in Arduino

Yash Sanghvi

Yash Sanghvi

Updated on 29-May-2021 13:33:04

941 Views

A problem faced by several people using Arduino, or any microcontroller board for that matter, is that you may forget to start the Serial Monitor before programming the board, and miss some print statements by the time you open the Serial Monitor.One way to overcome this is to start the ... Read More

Reserve memory in Arduino for string manipulation

Yash Sanghvi

Yash Sanghvi

Updated on 29-May-2021 13:32:27

646 Views

It may happen that a string may change length dynamically during the execution of a program.If you want to ensure that there is always enough memory available for your string, you can reserve some memory using the reserve() function.SyntaxString1.reserve(n_bytes);Where String1 is the string for which you are reserving memory, and n_bytes (unsigned ... Read More

Compare Strings in Arduino

Yash Sanghvi

Yash Sanghvi

Updated on 29-May-2021 13:32:02

4K+ Views

Arduino has an inbuilt compareTo() function that helps compare which string comes before another. Very crudely, you can think of it as this: if you are given two strings, which one will come first in a dictionary.SyntaxString1.compareTo(String2)Where String1 and String2 are the two strings to be compared. This function returns an ... Read More

Read values sent by Serial Monitor to Arduino

Yash Sanghvi

Yash Sanghvi

Updated on 29-May-2021 13:31:35

860 Views

The Serial Monitor of Arduino has a text box at the top, through which, users can send in text to the Arduino board.The text can be read by Serial.read(). Also, the Serial.available() function can be used to check if there is any data to read. It returns the number of ... Read More

How to Remove Characters from a String in Arduino?

Yash Sanghvi

Yash Sanghvi

Updated on 29-May-2021 13:31:15

5K+ Views

The remove function in Arduino helps you remove one or more characters from within a string.SyntaxmyString.remove(index, count)Here, index refers to the index from where removal has to start. Note that indexing in Arduino starts with 0. Thus, within string "Hello", 'H' is at index 0, 'e' is at index 1, and ... Read More

Set characters at a specific position within the string in Arduino

Yash Sanghvi

Yash Sanghvi

Updated on 29-May-2021 13:30:39

630 Views

In case you don’t want to overwrite a string, but just change a character at a specific position, Arduino provides the setCharAt() function exactly for that.SyntaxString1.setCharAt(ind, new_char);String 1 is the string to modify. ind is the index where the character needs to be set. new_char is the value of the new ... Read More

Advertisements