tinygo-org / drivers

TinyGo drivers for sensors, displays, wireless adaptors, and other devices that use I2C, SPI, GPIO, ADC, and UART interfaces.
https://tinygo.org
BSD 3-Clause "New" or "Revised" License
587 stars 180 forks source link

[HUB75]Leds do not light up as expected #691

Open ehime-iyokan opened 6 days ago

ehime-iyokan commented 6 days ago

I wrote program using hub75 package. but, it didn't light up. So I have tried to fix hub75. As a result. It light up as expected. And Environmental information is here. -> https://github.com/ehime-iyokan/tinygo_hub75_sample

picture1

First, I added a time.sleep(1 * time.Microsecond) after latch-High. By doing so, the light came on. However, I don't know why, so if you know, please let me know. Moreover, the red lights are on in different places.

picture2

Second, I fixed buffering of red data. I guess it has to do left-shift first. d.buffer[c][offsetR] = d.buffer[c][offsetR] &^ 1 << bitSelect -> d.buffer[c][offsetR] &^= 1 << bitSelect

picture3

ehime-iyokan commented 6 days ago

I added a time.sleep(1 * time.Microsecond) after latch-High. By doing so, the light came on. However, I don't know why If I figured out why it worked correctly, I'll create a pull request.