Yash Sanghvi has Published 192 Articles

Timer1 based PWM in Arduino Uno

Yash Sanghvi

Yash Sanghvi

Updated on 29-May-2021 14:01:47

9K+ Views

In an earlier article, we have seen how PWM can be set on Arduino Uno using the analogWrite() function. Pins 3, 5, 6, 9, 10 and 11 of Arduino Uno can support PWM. The frequency of the square wave is 490 Hz (about 2 ms time period) on all pins except ... Read More

Understanding Arduino Uno pinout

Yash Sanghvi

Yash Sanghvi

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

723 Views

The Arduino Uno board looks like the following −As you can see, the pins are broadly divided into 3 sections. Two sections at the bottom of the image, and one at the top.Let us look at the bottom sections.Section 1The first section contains power pins.The Vin pin can be used ... Read More

Store a new file in SD Card connected to Arduino

Yash Sanghvi

Yash Sanghvi

Updated on 29-May-2021 13:51:08

801 Views

In this tutorial, we will create a new file in an SD Card connected to Arduino Uno.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 5V ... Read More

List files stored in SD Card connected to Arduino

Yash Sanghvi

Yash Sanghvi

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

5K+ 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

2K+ 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

3K+ 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

532 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

1K+ 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

965 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

Advertisements