aindustriosa / RustyBugA

Firmware for the MightyBugA line follower done in Rust programming language
MIT License
5 stars 3 forks source link

Made it possible to share the ADC #49

Closed JatoMixo closed 2 months ago

JatoMixo commented 3 months ago

Added the heapless crate as a dependency to use the ADC inside of an Arc that can be cloned and used by multiple structs. This makes it possible for 2 different structs, like the light sensor array and the future battery sensor, to use the ADC1.

This pull request also adds a small example of how to use Arc with the ADC.