Connecting the other tilt switches

By now, you should have a feeling for how the tilt switch behaves and what values it outputs when you hold it upright or upside down.

With one tilt switch, we are able to sense two positions, either upright or upside down. We want to sense even more positions by using multiple tilt switches. If we arrange them at different angles, we can reliably sense various orientations.

Because we want to build a smart productivity cube, we need to sense six sides: bottom, top, left, right, front, and back. We need to lay out the tilt switches in such a way that all of these sides can be reliably sensed. When I say reliably, I mean that when placing the cube on one of its sides, the output of the tilt switches should ...

Get Hands-On Internet of Things with MQTT 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.