Last minute bug-fix of arduino-sketch
... happens when not completing testing before pushing commit :-)
This commit is contained in:
parent
f0f5391409
commit
c5d25f5bfe
2 changed files with 3 additions and 2 deletions
|
@ -139,8 +139,9 @@ led_pwm_handler
|
||||||
PRINTF ("GOT: %s\n", temp);
|
PRINTF ("GOT: %s\n", temp);
|
||||||
tmp = strtoul (temp, NULL, 10);
|
tmp = strtoul (temp, NULL, 10);
|
||||||
if (tmp > 255) {
|
if (tmp > 255) {
|
||||||
pwm = 255;
|
tmp = 255;
|
||||||
}
|
}
|
||||||
|
pwm = tmp;
|
||||||
PRINTF ("Setting: %d\n", pwm);
|
PRINTF ("Setting: %d\n", pwm);
|
||||||
REST.set_response_status(response, REST.status.CHANGED);
|
REST.set_response_status(response, REST.status.CHANGED);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -29,7 +29,7 @@ void setup (void)
|
||||||
void loop (void)
|
void loop (void)
|
||||||
{
|
{
|
||||||
/* Use 255 - pwm, LED on merkur-board is wired to +3.3V */
|
/* Use 255 - pwm, LED on merkur-board is wired to +3.3V */
|
||||||
analogWrite (LED_PIN, 255 - pwm); /*
|
analogWrite (LED_PIN, 255 - pwm);
|
||||||
printf ("clock : %u\nmillis: %lu\n", clock_time (), millis ());
|
printf ("clock : %u\nmillis: %lu\n", clock_time (), millis ());
|
||||||
delay (period_100ms * 100);
|
delay (period_100ms * 100);
|
||||||
analogWrite (LED_PIN, 255); /* OFF: LED on merkur-board is wired to +3.3V */
|
analogWrite (LED_PIN, 255); /* OFF: LED on merkur-board is wired to +3.3V */
|
||||||
|
|
Loading…
Add table
Reference in a new issue