It would also be good to use Python to generate a file and then trigger the C programme to display it. I am going to start looking at the C code and see if I can modify it play back a sequence of images from a directory. As long as you can generate the PPM files you can scroll whatever you like. The panel is great fun and the videos don’t really do it justice. Here is custom_ppm_images zip file with my custom PPM images if you want to try them. My next test was a small set of flags that looked something like this : The command below scrolled this nicely across the panel : sudo. My first custom graphic was a logo and some text : ppm extension and select “Raw” when prompted. In GIMP you can simply use “Export as”, use a filename with a. The width doesn’t matter as it is going to be scrolling horizontally. Use touch:bit as a controller for games on micro:bits LED matrix, or combine it with the. You start by loading or creating your source image and then re-sizing it so that it is only 32 pixels high. Six handy touch-sensitive buttons and LEDs for your micro:bit. I use the GIMP (it’s free!) and this file tpye is available via the “Export as” feature. If your panel is connected correctly and has enough power the “runtext.ppm” image will be scrolled across the screen for 20 seconds.Ĭreating your own graphics to scroll is really easy as long as you have an image editing application that can create Portable Pixmap Format (PPM). To get something on the panel you can try the including example image “runtext.ppm” : sudo. (if neither -d nor -t are supplied, waits for ) t : Run for these number of seconds, then exit. etc/init.d, but also when running without L : 'Large' display, composed out of 4 times 32x32 Which will display the available command line options : usage. Once compiled you can run the resulting executable using. Once extracted you can change to the subdirectory : cd rpi-rgb-led-matrix-master/Īnd then compile the code using : make Usage You can download the code to your Pi using : wget Īnd then unzip the archive using : unzip master.zip Lucky for me Henner Zeller has created a library of C code to drive this board via the Raspberry Pi’s GPIO pins and made it available on his rpi-rgb-led-matrix Github page. I tend to use Python so this makes it slightly outside my comfort zone. This makes it unsuitable for Python but better suited to C. You need a power source that can provide 5V with at least 2A.ĭriving the screen requires a lot of data to be sent to the screen on a constant basis. I used a RAVPower 10400mAh USB power bank to power it. It consists of the panel, a ribbon cable, a GPIO adapter and a power cable. I could only afford one so my screen is slightly smaller. This consists of 1024 RGB leds and is used as a building block for those large displays you see in stadiums. Uint16_t myBLACK = display.At the last Cambridge Jam I picked up a 32×32 LED matrix panel from SK Pang. Uint8_t display_draw_time=60 //30-70 is usually fine This defines the 'on' time of the display is us. PortMUX_TYPE timerMux = portMUX_INITIALIZER_UNLOCKED Creates a second buffer for backround drawing (doubles the required RAM) #define PxMATRIX_SPI_FREQUENCY 20000000 Defines the speed of the SPI bus (reducing this may help if you experience noisy images) Defines how long we display things by default Defines the buffer width / the maximum width of the matrix Defines the buffer height / the maximum height of the matrix This is how many color levels the display shows - the more the slower the update
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |