IS31fl3731 Charlie-Plexed LED Matrix

Discuss development of drivers for external hardware and components, such as LCD screens, sensors, motor drivers, etc.
Target audience: Users and developers of drivers.
Post Reply
User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

IS31fl3731 Charlie-Plexed LED Matrix

Post by deshipu » Sat Jul 09, 2016 12:41 pm

This chip is pretty nice. It's used in Adafruit's 16x9 LED matrix and in their CharlieWing for the Feather. You get a monochromatic matrix of up to 144 LEDs, with hardware PWM and blinking. It also has 8 frames of memory, and can fade between them, or play animations with them -- optionally synchronized to music! The code is at https://bitbucket.org/thesheep/micropyt ... 1fl3731.py

I looked at the datasheet, saw all the nice extra features the chip has, and decided to implement them all in this library -- the Adafruit library basically only lets you set the pixels.

User avatar
marfis
Posts: 215
Joined: Fri Oct 31, 2014 10:29 am
Location: Zurich / Switzerland

Re: IS31fl3731 Charlie-Plexed LED Matrix

Post by marfis » Sat Jul 09, 2016 5:46 pm

great, thanks for that. Will be on my list for a next adafruit order :)

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: IS31fl3731 Charlie-Plexed LED Matrix

Post by deshipu » Sat Jul 09, 2016 5:56 pm

Let me know how it works for you. I only tested it with the CharlieWing, but it should work the same with the other matrix. The CharlieWing seems to lack the audio input pin, though :-(

User avatar
marfis
Posts: 215
Joined: Fri Oct 31, 2014 10:29 am
Location: Zurich / Switzerland

Re: IS31fl3731 Charlie-Plexed LED Matrix

Post by marfis » Sat Jul 09, 2016 7:10 pm

https://www.adafruit.com/products/2946
seems to have an audio input, however no on board LEDs (they can be added via https://www.adafruit.com/products/2948 though which gives you the full 144 LED configuration).

MCHobby
Posts: 52
Joined: Mon Jan 26, 2015 2:05 pm
Contact:

Re: IS31fl3731 Charlie-Plexed LED Matrix

Post by MCHobby » Sat Jun 27, 2020 1:16 pm

I made a backport to MicroPython based board.

Code is available here https://github.com/mchobby/esp8266-upy/ ... ter/is31fl

IHOXOHI
Posts: 119
Joined: Sat Apr 25, 2020 7:31 am

Re: IS31fl3731 Charlie-Plexed LED Matrix

Post by IHOXOHI » Tue Sep 08, 2020 9:15 am

Hi,

I would like to use the matrix for display time.
Logically, on the 15x7 charlieWing matrice, there is a way for display 4 numbers of 3 pixels in width direction and 3 spaces between numbers.
Currently size of number is too big for doing that.
So, I need to change the "font" using by frambuffer.
In the doc, I have found this information:
"All characters have dimensions of 8x8 pixels and there is currently no way to change the font"

Currently means that it could be possible to change it?
If somoene has an advise for doing that...

Thanks.

IHOXOHI
Posts: 119
Joined: Sat Apr 25, 2020 7:31 am

Re: IS31fl3731 Charlie-Plexed LED Matrix

Post by IHOXOHI » Fri Sep 11, 2020 7:45 pm

Yap,
A script for display time on charlieWing matrix, from a newbie, so very heavy for nothing I think, ..., but it works.
Enjoy!

Code: Select all

from machine import I2C
import is31fl3731 as is31f
import time

i2c1 = I2C(scl='X9', sda='X10', freq=100000)
display = is31f.CharlieWing(i2c1)

#chiffre 0 sur la deuxieme place
def Chiffre_0(a):
        display.pixel(5+a,1,5)
        display.pixel(4+a,2,5)
        display.pixel(6+a,2,5)
        display.pixel(4+a,3,5)
        display.pixel(6+a,3,5)
        display.pixel(4+a,4,5)
        display.pixel(6+a,4,5)
        display.pixel(5+a,5,5)
#chiffre 1 sur la deuxieme place
def Chiffre_1(a):
        display.pixel(5+a,1,5)
        display.pixel(4+a,2,5)
        display.pixel(5+a,2,5)
        display.pixel(5+a,3,5)
        display.pixel(5+a,4,5)
        display.pixel(5+a,5,5)
def Chiffre_2(a):
        display.pixel(5+a,1,5)
        display.pixel(4+a,2,5)
        display.pixel(6+a,2,5)
        display.pixel(5+a,3,5)
        display.pixel(4+a,4,5)
        display.pixel(4+a,5,5)
        display.pixel(5+a,5,5)
        display.pixel(6+a,5,5)
def Chiffre_3(a):
        display.pixel(4+a,1,5)
        display.pixel(5+a,1,5)
        display.pixel(6+a,2,5)
        display.pixel(5+a,3,5)
        display.pixel(6+a,4,5)
        display.pixel(5+a,5,5)
        display.pixel(4+a,5,5)
def Chiffre_4(a):
        display.pixel(4+a,1,5)
        display.pixel(4+a,2,5)
        display.pixel(4+a,3,5)
        display.pixel(6+a,3,5)
        display.pixel(4+a,4,5)
        display.pixel(5+a,4,5)
        display.pixel(6+a,4,5)
        display.pixel(6+a,5,5)
def Chiffre_5(a):
        display.pixel(4+a,1,5)
        display.pixel(5+a,1,5)
        display.pixel(6+a,1,5)
        display.pixel(4+a,2,5)
        display.pixel(4+a,3,5)
        display.pixel(5+a,3,5)
        display.pixel(6+a,4,5)
        display.pixel(5+a,5,5)
        display.pixel(4+a,5,5)
def Chiffre_6(a):
        display.pixel(6+a,1,5)
        display.pixel(5+a,2,5)
        display.pixel(4+a,3,5)
        display.pixel(5+a,3,5)
        display.pixel(4+a,4,5)
        display.pixel(6+a,4,5)
        display.pixel(5+a,5,5)
def Chiffre_7(a):
        display.pixel(4+a,1,5)
        display.pixel(5+a,1,5)
        display.pixel(5+a,2,5)
        display.pixel(5+a,3,5)
        display.pixel(4+a,3,5)
        display.pixel(6+a,3,5)
        display.pixel(5+a,4,5)
        display.pixel(5+a,5,5)
def Chiffre_8(a):
        display.pixel(5+a,1,5)
        display.pixel(4+a,2,5)
        display.pixel(6+a,2,5)
        display.pixel(5+a,3,5)
        display.pixel(4+a,4,5)
        display.pixel(6+a,4,5)
        display.pixel(5+a,5,5)
def Chiffre_9(a):
        display.pixel(5+a,1,5)
        display.pixel(4+a,2,5)
        display.pixel(6+a,2,5)
        display.pixel(5+a,3,5)
        display.pixel(6+a,3,5)
        display.pixel(6+a,4,5)
        display.pixel(5+a,5,5)
        display.pixel(4+a,5,5)

global b
b = 2
def point(b):
    if b % 2 == 0:
        display.pixel(7,6,5)

global phrase1, phrase2, phrase3, phrase4
phrase1, phrase2, phrase3, phrase4 = "", "", "", ""

while True:

    heure = time.localtime()

    ###break down time
    heure1 = str(heure[3])
    heure11 = int(heure1[0])
    try:
        heure12 = int(heure1[1])
    except:
        heure11 = 0
        heure12 = int(heure1[0])
    heure2 = str(heure[4])
    heure21 = int(heure2[0])
    try:
        heure22 = int(heure2[1])
    except:
        heure21 = 0
        heure22 = int(heure2[0])
    ###link time to display commands
    for x in range(3):
        if heure11 == x:
            global phrase1
            phrase1 = "Chiffre_" + str(x) + "(" + str(-4) + ")"
    for x in range(10):
        if heure12 == x:
            global phrase2
            phrase2 = "Chiffre_" + str(x) + "(" + str(0) + ")"
    for x in range(6):
        if heure21 == x:
            global phrase3
            phrase3 = "Chiffre_" + str(x) + "(" + str(4) + ")"
    for x in range(10):
        if heure22 == x:
            global phrase4
            phrase4 = "Chiffre_" + str(x) + "(" + str(8) + ")"
    ###display command
    def affichage():
         global phrase1, phrase2, phrase3, phrase4
         convert1 = eval(phrase1)
         convert2 = eval(phrase2)
         convert3 = eval(phrase3)
         convert4 = eval(phrase4)
         return convert1
         return convert2
         return convert3
         return convert4
    
    affichage()
    b += 1
    point(b)
    time.sleep(1)
    display.fill(0)
Last edited by IHOXOHI on Sat Sep 19, 2020 10:02 pm, edited 1 time in total.

User avatar
mcauser
Posts: 507
Joined: Mon Jun 15, 2015 8:03 am

Re: IS31fl3731 Charlie-Plexed LED Matrix

Post by mcauser » Wed Sep 16, 2020 12:13 pm

Hey @deshipu
Your link is now 404ing: https://bitbucket.org/thesheep/micropyt ... 1fl3731.py
Are you migrating away from bitbucket?

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: IS31fl3731 Charlie-Plexed LED Matrix

Post by deshipu » Wed Sep 16, 2020 11:09 pm

I'm not migrating. Bitbucket decided to permanently delete all Mercurial repositories a while ago.

Post Reply