This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
digispark:tutorials:propwm [2015/01/12 15:21] digistump |
digispark:tutorials:propwm [2015/06/23 13:47] digistump |
||
|---|---|---|---|
| Line 11: | Line 11: | ||
| The standard Arduino analogWrite function works with the Pro. Using analogWrite(pin,value) where pin is the pin number, and value is the PWM value you want to set that pin to - works just like a regular Arduino and sets that pin to that value and disconnects all other pins on that channel from the PWM channel. This means with analogWrite you can have one pin on each channel active at a time. | The standard Arduino analogWrite function works with the Pro. Using analogWrite(pin,value) where pin is the pin number, and value is the PWM value you want to set that pin to - works just like a regular Arduino and sets that pin to that value and disconnects all other pins on that channel from the PWM channel. This means with analogWrite you can have one pin on each channel active at a time. | ||
| + | |||
| + | Note: Pin 8 PWM functionality is accessed only with analogWrite - since it is the only pin on that channel the other functions below are not needed | ||
| =====Special PWM functions:===== | =====Special PWM functions:===== | ||
| - | The Digispark Pro also has the following special functions available for use with the PWM functionality: | + | The Digispark Pro also has the following special functions available for use with the PWM functionality on Pins 0-4 **(these are not used for Pin 8 - see note above)**: |
| **pwmWrite(channel,value);** | **pwmWrite(channel,value);** | ||