RGB LED of the MAKER-PI-PICO board
Budget: $30 – $250 USD
The assembly portion of your code should:
- Enable and initialise the RP2040 ADC to allow the temperature diode to be read.
- Use an alarm interrupt handler to implement an infinite loop that periodically reads the temperature diode value (e.g., every 1 second) and store it to a shared datasegment (you can re-use your own code from assignment #01 to initialise the alarm ISR and the alarm interrupt handler).
- Call an appropriate function, that you define in the C portion of your code, to convert the raw temperature diode reading into an actual temperature reading and pass the raw value retrieved from the shared data segment to that function.
The C portion of your code should:
- Initialise the WS2812 RGB LED on the MAKER-PI-PICO using the RP2040 PIO component.
- Implement a suitable function (to be called from the assembly code) that takes in the raw ADC value as an argument and converts it to a floating-point temperature reading.
- Print the current temperature reading to the console
- Set the RGB LED to an appropriate colour based on the temperature reading (e.g red for hot, orange for warm and green for cold).
- Enable and initialise the RP2040 ADC to allow the temperature diode to be read.
- Use an alarm interrupt handler to implement an infinite loop that periodically reads the temperature diode value (e.g., every 1 second) and store it to a shared datasegment (you can re-use your own code from assignment #01 to initialise the alarm ISR and the alarm interrupt handler).
- Call an appropriate function, that you define in the C portion of your code, to convert the raw temperature diode reading into an actual temperature reading and pass the raw value retrieved from the shared data segment to that function.
The C portion of your code should:
- Initialise the WS2812 RGB LED on the MAKER-PI-PICO using the RP2040 PIO component.
- Implement a suitable function (to be called from the assembly code) that takes in the raw ADC value as an argument and converts it to a floating-point temperature reading.
- Print the current temperature reading to the console
- Set the RGB LED to an appropriate colour based on the temperature reading (e.g red for hot, orange for warm and green for cold).