Chapter 45. Coin Toss



Coin Toss helps you with any heads-or-tails type of decision. Make an upward tossing motion with the phone in your hand, and watch the coin of your choice flip to give you an answer. You can choose between a penny, nickel, dime, or quarter, and see a neat visual history of your coin tosses.

The lesson of this chapter is detecting a tossing/throwing motion with the phone. And surprise, surprise, it’s the same algorithm used in the preceding chapter for detecting punches! (I guess they call it ...

Get 101 Windows now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.