Using logic bits to make decisions

Inverter

Unlike the logic modules, the Inverter takes only one input. Usually, the Inverter is used to reverse the output from a logic module. The block-out buzzer built in the NAND example used the Inverter in two ways: once to invert the output of a logic module to control the LED properly and once to convert an AND module to a NAND module. However, I ran across a problem that the Inverter module solved on its own.

During a friendly family game of Uno [4], we kept forgetting the direction of play after a number of reversals. With the circuit shown in Figure 8, we could tell at a glance whether play should proceed clockwise or counterclockwise. A press of the button changed the direction of play when a Reverse card was played.

Figure 8: The LED clearly shows whether play should continue counterclockwise (left) or clockwise (right).

The circuit incudes the following modules:

  • Power
  • Button
  • Latch
  • Fork
  • Inverter and Long LED on the left fork
  • Branch and Long LED on the right fork

The Latch module continues sending a signal from a button press until a second press of the button; otherwise, you'd have to press and hold the button to keep the LED lit. The Fork module sends the signal in two directions, and the Inverter reverses the signal each time the button is pressed. The Branch module simply allows the LED to curve in the desired direction.

Conclusions

The littleBits logic modules allow you to inject a bit of complexity into your projects, and often you can even avoid having to write programs to get the desired results.

Buy this article as PDF

Express-Checkout as PDF

Pages: 4

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content