Arduino pico

This is where the pico ledstrip projects are store, for a bit of context: for year 1 period 2 i am tasked with working with the arduino pico and a ledstrip (w2812B).

This project mostly revolves around making the ledstrip light up certain leds and patterns, the fundamental lesson that the school is trying to teach us is learning to work with loops and statements. Through these projects we will be required to rely less on simple inputs and imports and more on thinking out of the box.

The files refferenced can be found in https://git.herreweb.nl/IthamarHerrewijnen/Ithamar_code/src/branch/main/documentation/source or the git repository. Apart from micropython no other packages have to be installed.

Notable files

Colorwave: This is one of the files required to work with the ledstrip. It defines colors for easier use and can be used as a test file to see if a strip works or not.

Notes

This code contains a lot of callable intergers, it also gives the function to the ledstrip to move from left to right.

NeoPixel: this file actually programs directly into the ledstrip rather than give it some intergers. This file is required to operate the ledstrip to begin with. therefore it is a rather large file with a full documentation on github.

notes

This code contains all the technical functions of the ledstrip setup. The interesting part for the user are functinos such as “brightness”, “show” and “rotate”. Whereas colorwave gave the user the colors for the ledstrip, Neopixel gives the user all the fun functions to create your own custom lighting.

discolight_sl: This is the main file i’m currently using to stash all my functions in. For the moment this only includes some code i got from some guy called disco. My own code which is called police and a shutoff function. Because i’m too lazy to scroll for the functions i call them in a different file.

Notes

This code has very few interesting notes, In the function: “discolight” we use a randomizer to set every pixel to some random rgb value. In the function :”police” we use a clever calculation to get the even numbers for one set of leds and the very same formula to get the uneven leds. After that we simply make the leds take turns in who gets to light up first, creating a policelight effect.

This code is a work in progress and will be continued in due time.