Skip to content

Instantly share code, notes, and snippets.

@derfaq
Last active September 25, 2018 02:57
Show Gist options
  • Save derfaq/1149405802b0f1206f86db62bd43d769 to your computer and use it in GitHub Desktop.
Save derfaq/1149405802b0f1206f86db62bd43d769 to your computer and use it in GitHub Desktop.
analogWrite at half
int led = 10; // the PWM pin the LED is attached to
void setup() {
pinMode(led, OUTPUT);
}
void loop() {
// set the brightness at half:
analogWrite(led, 127);
}
// I can edit my gist with my smart phone
// it isn't great?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment