-
@allObjects I did a quick test run the other day and found that the basic sending of 4 element data array [R,B,G,row] works. I haven’t tried to leverage the Graphics lib yet but did find some anomalies:
- Sending just R data works fine
- Sending data with B and or G lit worked (got cyan pixels)
- Introducing R killed other B or G pixels - as if red pixels suck all the power
- Connecting external 5v to the module made it go disco crazy (is it because module and espruino need to share common ground?)
- With espruino original board and intervals to cycle through the rows in the simplest way I need 1ms to get a stable / non flickering updates
I also realized that this module is 3 bits display - foolishly assumed I can do full color (24 bit) 😔. I suppose the LED module supports that but will need PWM per light diode to get 8bit per pixel. Which I believe is what Neopixel does, pwm controller chip per diode.
I will tinker some more and post vids / updates.
- Sending just R data works fine
-
@Gordon thanks for the note (and congrats on the baby!) - I have a 16x16 neopixel (haven't gotten around to play with it yet). I'm interested in the module in this thread because of the size and rigidity (ideas for it includes a wifi-connected icon pendant). I just got the module and hoping to squeeze some time to try it out per @allObjects' comment (thanks!).
-
Thanks for the info. It will be useful for my investigation. This is how the sequence goes for RPi:
[#include](https://forum.espruino.com/search/?q=%23include) [#include](https://forum.espruino.com/search/?q=%23include) [#include](https://forum.espruino.com/search/?q=%23include) [#include](https://forum.espruino.com/search/?q=%23include) [#define](https://forum.espruino.com/search/?q=%23define) RED_DATA 0 [#define](https://forum.espruino.com/search/?q=%23define) BLUE_DATA 1 [#define](https://forum.espruino.com/search/?q=%23define) GREEN_DATA 2 int main(void) { static uint8_t data[4] = {0x0,0x0,0x0,0x0}; wiringPiSetup(); wiringPiSPISetup(0,500000); while(1) { static uint8_t heart[8] = {0x00, 0x66, 0xFF, 0xFF, 0xFF, 0x7E, 0x3C, 0x18}; int j; int x=2; for ( j=0;j<8;j++) { data[0] = ~heart[j]; data[2] = 0xFF; data[1] = 0xFF; data[3] = 0x01 << j ; wiringPiSPIDataRW(0,data,sizeof(data)); delay(x); }; }; }
My plan is to hopefully port the above. Seems like data is four bytes, with first byte being the col (or row?) data. Not sure the second and the third staying 255, and the last one seems like the col (or row) marker?
What would the SPI.write arguments be mapping to the above?
Thanks again!
-
I had a lot of fun with MAX7219 8x8 matrices and was looking to play with an RGB version. Alas, closest one I can find is from https://www.52pi.com/home/221-raspberry-pi-3-model-b-8x8-full-color-rgb-led-matrix-module-for-arduino-stm32.html?search_query=led&results=30 . It's driven by 74HC595 shift registers. The page in the link listed a wiringPi code example for RPI. Is it going to be a straightforward port? I am decent with JS but total noob with electronic interfaces (SPI). Also, I can't seem to find datasheet for the module. Just wondering if it's worth taking the plunge to try making it work on espruino.
That's a great solution! I still need the expander for incorporating an 8x8 key matrix, but then with the nRF24 and MAX7219 sharing the SPI pins I can do hardware SPI for them. Then I'll still have additional GPIO on the expander for simpler input/output.
Question, can I share I2C pin (ex. CLK) with SPI usage, esp. when the I2C pins have external pullup resistors?