Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

4. Project: Clock

Chapter 4. Project: Clock

IN THIS CHAPTER

Parts List

Assembly Instructions

Program the Robot

Setting the Clock

The Next Chapter

In this chapter you’ll learn how to build a fully functional Mindstorms clock
Figure 4-1. In this chapter you’ll learn how to build a fully functional Mindstorms clock

Our next project is a simple one—or so we imagined when we began designing it. We thought, “What could be simpler than a Lego clock? Sounds like a great project for a book about Lego and Arduino projects.” Stick a couple of motors on a Lego frame and have the Arduino move the motors to tell us what time it is.

Fortunately, it wasn’t that simple, and we ended up adding a lot of complexity to the project. We built this project before we created the Bricktronics Shield, so we had to figure out how to control motors and display the time via clock hands (see ABOUT THE L293D CHIP). We say “fortunately” because we learned an insane amount about interweaving the two systems, and we’re sharing what we learned with you. Read on!

The clock hands move with the help of two standard Mindstorms motors, controlled by an Arduino Uno, and a couple of buttons allow you to set the time.

A NOTE ABOUT MODDING LEGO

Lego fanatics will howl when they see what we had to do to the 40-tooth gear in order to make this design work. To AFOLs (Adult Fans of Lego), damaging, modifying, or gluing Lego elements is considered anathema, as is using non-Lego parts in your model. Sorry, folks! This is just the second project and we’re already altering and gluing Lego and using Arduino in place of the familiar NXT microcontroller bricks. Our philosophy is that it’s okay to mod your bricks in any way that meets your needs, just like any other tool. By adding Arduino, our readers will learn a lot about how Mindstorms and electronics work. We call that a win, even if it troubles purists along the way.

  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint