mchr3k / arduino-libs-manchester

173 stars 113 forks source link

Pulse width modulation #27

Open agentff6600 opened 8 years ago

agentff6600 commented 8 years ago

Hi,

I'm using the manchester library for a simple Visible Light Communication setup. Instead of a wired connection I use an LED as transmitter and a photodiode with a pull-down setup at the receiver. Works fine so far but now I would like to incorporate LED dimming through pulse width modulation.

I was wondering how to approach pulse width modulation for this library? I see the variable "delay1" and "delay2" in the .cpp file (line 85-86). If I add additional variables to shift the pulse width would that work? Do I overlook something? How would it affect the receiving?

Cheers Charles