Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| chipkit_ledboard [2015/03/10 20:18] – [Step 5: Software] Joshua Woldstad | chipkit_ledboard [2022/10/04 11:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 100: | Line 100: | ||
| {{: | {{: | ||
| - | In order to run the Snake program correctly, you must first install the [[https:// | + | In order to run the Snake program correctly, you must first install the [[https:// |
| + | PICxel name_of_the_set_of_LEDs( how_many_LEDs_we_have, | ||
| + | |||
| + | Here we can provide how LEDs we are running (900), which pin the data is going to be used to connect to the data line on the LEDs (pin 3 in our case), and the desired color mode. Marshall' | ||
| + | We can get the LEDs lit up and running by first calling in our setup the name_of_the_set_of_LEDs.begin(); | ||
| + | |||
| + | function and then choose the settings of the LEDs and subsequently update the strip of LEDs with our new values. | ||
| + | For HSV color mode, you can set the hue, saturation, and value. For those of you that might not know, these values roughly translate to the color, how " | ||
| + | |||
| + | This function will only set (but not yet update) the values on just one LED, so it's recommend to use a for loop to change multiple LED values. To update the LEDs so that they all show their new settings (or old if that particular LED was not updated), simply issue the following command: name_of_the_set_of_LEDs.refreshLEDs(); | ||
| + | |||
| + | The refresheLEDs() function utilizes port manipulation and assembly code to make for a tight library so very little time is wasted in sending out the new information to the WS2812 LEDs at their designated data rate. You can check out a screen shot of the HSV demo for this library in the picture for this step. | ||
| Go [[http:// | Go [[http:// | ||
| Download [[http:// | Download [[http:// | ||

