This project was my first time using an ARM Cortex-M4F based microcontroller and having to directly access the memory to configure modules on the device.
I used a color sensor which gathered RGB data for a specified length of time, and stored the 16-bit color value across 2 8-bit registries. The microcontroller would then accessed these 2 registries through I2C. The device would then mimic the detected color using an RGB LED. This required the set up and configuration of the PWM module on the microcontroller and the ability to change it in real time based on the color values given by the sensor. I also included a way to hold the detected color using an interrupt on the on-board switch.
One of the biggest challenges faced on this project was learning how to use the I2C or PWM modules on this particular microcontroller. I spent a lot of time looking over the datasheets for the I2C module and the microcontroller, sifting through the source code of Arduino libraries, and using a digital logic analyzer to better understand how this device's I2C and PWM modules work on such a low level.
© 2025 • All content within this project is strictly the property of Sean Booth and is not for public use without permission.
Comments