Adafruit Feather M4 Express with Charliewing 15x7 / Blink

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Joggel
 
Posts: 7
Joined: Sat Apr 09, 2022 2:42 pm

Adafruit Feather M4 Express with Charliewing 15x7 / Blink

Post by Joggel »

Hi all,
if manageged to run the scrolling text example code on my devices.

For blinking LED's by using REPL on the Charliewing 15x7 i followed:

https://learn.adafruit.com/adafruit-15x ... cuitpython.

Actually i am not able to get display.blink, display.fill and individual blinking LED's to run.
I also tried it with the code below with no sucess. It just shows 2 static LED's

Code: Select all

import board
import busio
from adafruit_is31fl3731.charlie_wing import CharlieWing as Display
i2c = busio.I2C(board.SCL, board.SDA)
display = Display(i2c)
#display.fill
#display.blink(500)
display.pixel(2, 2, 25, blink=True)
display.pixel(3, 3, 25, blink=True)
Any ideas?

Thanks a lot

Christian

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Adafruit Feather M4 Express with Charliewing 15x7 / Blin

Post by mikeysklar »

Christian,

Have you tried adding blink=True?

Code: Select all

display.fill(127, blink=True)
You'll notice nothing actually changes on the board. This is because in addition to intensity each LED pixel has a blink state which can be enabled and disabled. The fill command can actually set all pixels and turn them on to blink:
You can turn off the blinking by setting blink=False.

The pixel command supports the blink parameter too! You can turn on and off blinking pixel by pixel as needed. For example to turn on blinking for pixel 0, 0:

User avatar
Joggel
 
Posts: 7
Joined: Sat Apr 09, 2022 2:42 pm

Re: Adafruit Feather M4 Express with Charliewing 15x7 / Blin

Post by Joggel »

Thanks Mike,
i tried, but nothing happend regarding blink function. I did the test with dimming the LED's to 10 according your sugested code with 127
this works ok but blinking not.

That's the code with decommented lines with all i tried for activate the blinking function

Code: Select all

import board
import busio
from adafruit_is31fl3731.charlie_wing import CharlieWing as Display
i2c = busio.I2C(board.SCL, board.SDA)
display = Display(i2c)
display.frame(1, show=False)
#display.fill(0)
#display.fill
display.fill(10, blink=True)
#display.blink(500)
#display.pixel(2, 2, 25, blink=True)
#display.pixel(3, 3, 25, blink=True)
display.frame(1)  # show=True is the default, the frame will be displayed!
Hopfully there is another idea ;-) Thanks

Christian

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Adafruit Feather M4 Express with Charliewing 15x7 / Blin

Post by mikeysklar »

Christian,

Your code has no delays in it and no loop so I think what is happening is the instructions are being executed much faster than you can see them. try adding some multisecond delays or a while True: main loop so you can catch the activity.

User avatar
Joggel
 
Posts: 7
Joined: Sat Apr 09, 2022 2:42 pm

Re: Adafruit Feather M4 Express with Charliewing 15x7 / Blin

Post by Joggel »

Hi Mike,
thanks for your suggestions, yes i could implement a kind of workaround, but if the instructions given by the developers team
on the Charliewing product, this should work anyway.

If you check

https://learn.adafruit.com/adafruit-15x ... cuitpython

and then go to chapter "CircuitPython & Python Usage", there is the clear instruction how to set up different blinking modes.
So to speak, the blinking mode is already built in and can be controlled by blink=True / False

Either i missed something relevant (additional library for blinking LED's) or the example for Circuit Python is copied over from the Arduino plattform
or the Circuit Python firmware does not support the blink mode. We have to see, that Charliewing LED matrix is controlled by i2C and the PWM LED Matrix Driver
IS31FL3731. There is no direct GPO control of the LED's.

Most likely someone from Ciryuit Python or Charliewing developer team has to jump in here to share some light to this issue.
Mike, any chance to give the a "heads up" to this post?

Thanks

Christian

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Adafruit Feather M4 Express with Charliewing 15x7 / Blin

Post by mikeysklar »

Christian,

Let's gather up the details on your setup so you can submit an issue to the github repo and get the library maintainer to take a look.

You are using a Feather M4 Express with your Charliewing.

When you run the stock blink example (this one):

https://github.com/adafruit/Adafruit_Ci ... example.py

the code is not blinking and filling?

Please make sure you running CircuitPython 7.2.5 with the current library drop 20220507 and M4 bootloader (3.14).

https://circuitpython.org/board/feather_m4_express/
https://circuitpython.org/libraries

User avatar
Joggel
 
Posts: 7
Joined: Sat Apr 09, 2022 2:42 pm

Re: Adafruit Feather M4 Express with Charliewing 15x7 / Blin

Post by Joggel »

Hi Mike,
Circuit Python, libraries and bootloader are loaded with the current version. I also tried the absolut newest from Amazon S3.
Actually i just follow the sample description to manipulate single LED's or the entire matrix given by

https://learn.adafruit.com/adafruit-15x ... cuitpython

under chapter "CircuitPython & Python Usage".
There is the clear instruction how to set up different blinking modes for individual LED's and the entire matrix.
This is not working for me either when i add the instruction in code.py or over REPL. Also REPL is not giving back a error.

When i run the stock blink example this works fine, but not the example given on the link above.

Thanks Christian

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Adafruit Feather M4 Express with Charliewing 15x7 / Blin

Post by mikeysklar »

Does this is31fl3731_blink_example.py code work or not?

https://github.com/adafruit/Adafruit_Ci ... example.py

User avatar
Joggel
 
Posts: 7
Joined: Sat Apr 09, 2022 2:42 pm

Re: Adafruit Feather M4 Express with Charliewing 15x7 / Blin

Post by Joggel »

[quote="mikeysklar"]Does this is31fl3731_blink_example.py code work or not?

Mike, as written above
>> When i run the stock blink example this works fine, but not the example given on the link above.

So to speak yes ;-)

But anyway, found the cause:
The code i posted above was missing the instruction

Code: Select all

display.blink(1500)
This is the command to initialize the blink function. After executing of this command, all blink commands working perfectly
and for instance

Code: Select all

display.pixel(0, 2, 40, blink=True)
can be manipulated with False OR True

Thanks Christian

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”