This routine draws an integer, val, in the range 0 – 999 on the display in the specified colour. We’ve written a function to help set specific pixels to the required colour: def xy_set(x, y, colour): So, the last LED is numbered 15 + 9 * 16 = 159 From this it is easy to calculate the index/position of any LED on the board with: If we use co-ordinates with the top left LED as the origin (0,0) the bottom right LED is at (15,9). If we turn the board so that the USB connection is on the right then the LEDs are numbered 0 – 15 on the top row moving left to right, 16 - 31 on the second row, and this theme continues until 44 to 159 on the bottom row. There are jumpers on the underside of the board to connect DIN (Data In) to GP6, GP7 or GP22. 5V goes to VBUS, GND to GND and DIN to GP6 or other suitable pin of your choice. Take care get it the right way round by lining up the USB end correctly:Īlternatively, you can use jumper wires to connect the pins on the underside of the display to your Pico. Either plug the board directly onto a Pico or via an expander board.
0 Comments
Leave a Reply. |