bhagman / SoftPWM

A Wiring (and Arduino) Library to produce PWM signals on arbitrary pins.
MIT License
86 stars 31 forks source link

SoftPWM_Wiring_HeartBeat #4

Closed klint-k closed 6 years ago

klint-k commented 6 years ago

suggested add:

byte WLED = 13;

else you get:

Arduino: 1.8.5 (Linux), Board: "Arduino Nano, ATmega328P"

/home/pi/Arduino/libraries/SoftPWM/examples/SoftPWM_Wiring_HeartBeat/SoftPWM_Wiring_HeartBeat.pde: In function 'void setup()': SoftPWM_Wiring_HeartBeat:8: error: 'WLED' was not declared in this scope SoftPWMSet(WLED, 0); ^ /home/pi/Arduino/libraries/SoftPWM/examples/SoftPWM_Wiring_HeartBeat/SoftPWM_Wiring_HeartBeat.pde: In function 'void loop()': SoftPWM_Wiring_HeartBeat:18: error: 'WLED' was not declared in this scope SoftPWMSet(WLED, 255); ^ exit status 1 'WLED' was not declared in this scope

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.

DoiChris commented 6 years ago

even if I set the PWM to 0 the LED doesn't go of entirely. Its always lighting a bit! what can be the reason? I used a sink configuration with the ATMEGA GPIO to GND.

bhagman commented 6 years ago

Fixed with Paul's changes here: https://github.com/bhagman/SoftPWM/pull/3

bhagman commented 6 years ago

@DoiChris -- please create a separate issue