Open gbip opened 6 years ago
I still beleive the TCS3200 color sensor outputs a square wave, and gives the color information by changing the frequency of the output, not its duty cycle. Source : this arduino tutorial I tried
Timer can also measure PWM frequency :wink: In fact they do both at once : they measure the frequency and the duty cycle.
Our RGB sensor returns a PWM to indicate the color intensity.
We need a way to measure this PWM, either using a dedicated component and an adc, or using a timer in PWM measure mode.
To write the firmware of this board we need to have some kind of high-level interface with the timer. This is usually done through a Hardware Abstraction Library.
If you want to tackle this issue you have to
A few tips and tricks for the API design :