Chapter 34. Experiment 34: Ambient Sensing

In this section, I’m returning to the basic concept that I have used before, of choosing a random number by stopping a fast timer at an arbitrary moment.

This was the technique in the Ching Thing in Experiment 28, and also in the Hot Slot game in Experiment 21. However, both of those games required the player to do something that would stop the timer. What I’m going to describe here is a way for a sensor to inject a random factor without any user input.

First I’ll recap the basic setup of a slow monostable timer, which starts and stops a fast asynchronous timer, which drives a counter. I’ll be using this in all the sensor-based randomizing applications below.

Then I’ll pause for a moment to show you how ...

Get Make: More Electronics now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.