Book Image

Arduino BLINK Blueprints

By : Utsav Shah
Book Image

Arduino BLINK Blueprints

By: Utsav Shah

Overview of this book

Arduino is an open-source prototyping platform based on easy-to-use hardware and software. Arduino has been used in thousands of different projects and applications by a wide range of programmers and artists, and their contributions have added up to an incredible amount of accessible knowledge that can be of great help to novices and experts alike. Want to build exciting LED projects with Arduino? This book will be your companion to bring out the creative genius in you. To begin with, you will get introduced to the maker movement and the open source hardware development Arduino boards. You will then move on to develop a mood lamp and a remote-controlled TV backlight. As you progress through the book, you will develop an LED cube and will learn to use sound visualization to develop a sound-controlled LED Christmas tree. You will then move on to build a persistence of vision wand. At the end of each chapter, you’ll see some common problems, their solutions, and some workarounds.
Table of Contents (14 chapters)

Synchronizing an LED array with a motor


In the previous sections of this chapter, we learned about controlling an LED array and DC motor using Arduino:

Once you have connected the circuit as shown in the preceding image, upload the following code to Arduino. In the following code, we are writing the "Hello world" of persistence of vision:

int LEDPins[] = {2, 3, 4, 5, 6, 7, 8, 9};
int noOfLEDs = 8;

//data corresponding to the each alphabet and a few characters to be displayed
byte H[] = {B11111111, B11111111, B00011000, B00011000, B00011000, B00011000, B11111111, B11111111};
byte E[] = {B00000000, B11111111, B11011011, B11011011, B11011011, B11011011, B11000011, B11000011};
byte L[] = {B00000000, B11111111, B11111111, B00000011, B00000011, B00000011, B00000011, B00000011};
byte O[] = {B00000000, B11111111, B11111111, B11000011, B11000011, B11000011, B11111111, B11111111};
byte fullstop[] = {B00000000, B00000000, B00000000, B00000011, B00000011, B00000000, B00000000, B00000000};
byte comma...