Soundscapes community forum

Notifications
Clear all

[Sticky] Light level sonification example with the micro:bit

David Sousa
(@david382)
Member Admin

The following program continuously reads the ambient light level using the micro
’s light sensor. It maps this light level to a corresponding frequency in the range of 200 Hz to 3000 Hz and plays a tone at this frequency. Additionally, the current light level is sent to the serial output, allowing it to be monitored in real time.

Link to the editable code

This code is useful for creating a real-time audio representation of the ambient light level. As the light level changes, the frequency of the sound changes, providing an auditory indication of light intensity. The serial output allows for monitoring or logging the light level data for further analysis.

Importantly, the ligh level code block in this code can be replaced by any other input block, such as an acceleration block.

Give it a try!

Quote
Topic starter Posted : 10/07/2024 7:52 am
paulprouse and BetiB reacted
Share: