Book Image

Learning C for Arduino

By : Syed Omar Faruk Towaha
Book Image

Learning C for Arduino

By: Syed Omar Faruk Towaha

Overview of this book

This book will start with the fundamentals of C programming and programming topics, such data types, functions, decision making, program loops, pointers, and structures, with the help of an Arduino board. Then you will get acquainted with Arduino interactions with sensors, LEDs, and autonomous systems and setting up the Arduino environment. Moving on you will also learn how to work on the digital and analog I/O, establish serial communications with autonomous systems, and integrate with electronic devices. By the end of the book, you will be able to make basic projects such as LED cube and smart weather system that leverages C.
Table of Contents (17 chapters)
Learning C for Arduino
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Connecting an SD card to your Arduino


Let's move on to an interesting subject. We will now connect an SD card to our Arduino, read files from it, and write a file to the card. To connect an SD card to your Arduino, you need an SD card module. So, what is an SD card module? Alright, an SD card module is an extended part of Arduino which can be added to read or write an SD card. There are two types of card module in the market, an SD card module and a micro SD card module. In this chapter, we will use the a micro SD card module.

Following is a photo of different SD card modules:

Now you can clearly understand what an SD card module is. It's much like a card reader, but slightly different. Most SD card modules have six pins in common. The pin out of the module is as shown in the following photo:

So, you may be wondering what the pins do. Okay, before learning about the card module pins, let's learn about our memory cards' pins. We usually use SD or micro SD cards. Usually, an SD card has 9...