Search icon CANCEL
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arduino Wearable Projects

You're reading from  Arduino Wearable Projects

Product type Book
Published in Aug 2015
Publisher
ISBN-13 9781785283307
Pages 218 pages
Edition 1st Edition
Languages

Finishing the glasses Knight Rider style


For the last code example, we will have a look at how to create an animation. An animation is a simulation of motion, and in one sense the first code example in this chapter is a form of animation. We will build on the same principle in this section. Once you get the hang of the basic concepts, you can start building your own animations, combining the knowledge from the pattern example with the knowledge in this sketch.

In my beginner Arduino classes, the Knight Rider example is a classic. This example is inspired by the 80s hit show Knight Rider with David Hasselhoff. To be more precise, the example is inspired by the robotic car featured in the show, which is called Kit. In the front of Kit there is a small LED display that shows a bouncing light effect. This is the effect we will recreate on the front of the glasses.

The code example is fairly simple and does the same thing as the test sketch, but instead of lighting up only one LED at a time we...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}