hello, I need the strech by bluetooth shit, and I get it, but I must be attentive to press the reset arduino-one.
when bleutooch connects, there squeezed reset and this loads the strech.
I tried to use the wacthdog, when this is connected to a reset,
but I can not load the strech, someone has done something similar to what
comment?
#include <avr/wdt.h>
int led = 9; // the pin that the LED is attached to
int brightness = 0; // how bright the LED is
int fadeAmount = 5; // how many points to fade the LED by
void setup ()
{
Serial.begin (115200);
pinMode(led, OUTPUT);
// Serial.println ("Restarted.");
while(!Serial){
;
}
wdt_reset ();
wdt_disable();
} // end of setup
void loop ()
{
analogWrite(led, brightness);
// change the brightness for next time through the loop:
brightness = brightness + fadeAmount;
// reverse the direction of the fading at the ends of the fade:
if (brightness == 0 || brightness == 255) {
fadeAmount = -fadeAmount ;
}
// wait for 30 milliseconds to see the dimming effect
delay(30);
} // end of loop