Skip to content

Instantly share code, notes, and snippets.

@michaelsarduino
Created August 21, 2015 09:31
Show Gist options
  • Save michaelsarduino/a680b8836faf21e5cadb to your computer and use it in GitHub Desktop.
Save michaelsarduino/a680b8836faf21e5cadb to your computer and use it in GitHub Desktop.
#include <SoftPWM.h>
void setup() {
SoftPWMBegin();
SoftPWMSet(A0, 0);
}
void loop() {
int i = 0;
while(i<255)
{
SoftPWMSet(A0, i);
i++;
delay(3);
}
i = 255;
while(i>0)
{
SoftPWMSet(A0, i);
i--;
delay(3);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment