Skip to content

Latest commit

 

History

History
52 lines (32 loc) · 2.01 KB

README.md

File metadata and controls

52 lines (32 loc) · 2.01 KB

charlieplex6

The experiment was to see how quickly I could charlieplex 2 x 3-led bar displays and drive it with a Raspberry Pi (2). Breadboarding was fairly simple - figuring it out on Fritzing took longer!

The Board - Operational

ezgif.com-1.gif

The Board - All

Charlieplex6-9907.jpg
The Raspberry Pi is mounted on the "official" touchscreen (which is not being used here) and is running from a 20Ah LiPo pack.

Components

  • Raspberry Pi (model not important)
  • 2 x MU04 Light bars
    • MU04-2101 Red
    • MU04-4101 Yellow-Green
  • 3 x 220 ohm resistors

The MU04 units are now obsolete and there's not even a Fritzing image for any of them. I replaced the LED bar with 3 discrete LEDs in the Breadboard image.

 

Fritzing - Breadboard

charlieplexing6-3_bb.png

Fritzing - Schematic

charlieplexing6-3_schem.png

Original diagram inspiration:

 

Code

Original code inspiration: Github: raspberrypi_cookbook_ed2/charlieplexing.py by Simon Monk

Development from SM's code:

  • Constants used in the pin_led_states table. This makes it more clear that the pins are tri-state with values: HI, LO, and INput mode.
  • Converted to Python3
  • Wrapup code added to respond gracefully to Ctl-C or a kill signal.
  • LED display closed down before program termination with the clear_pins function

Ron
April 20, 2017