I´m using the Arduino IDE 1.6.7
All I was trying to do was the "Sweep" example for the servo.
It will run a few times, but afterwards it will give me an Expection.
This is my modified code:
#include <Servo.h>
Servo myservo; // create servo object to control a servo
// twelve servo objects can be created on most boards
int pos = 0; // variable to store the servo position
void setup() {
myservo.attach(4); // attaches the servo on pin 9 to the servo object
Serial.begin(115200);
}
void loop() {
for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees
// in steps of 1 degree
Serial.println(pos);
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(150); // waits 15ms for the servo to reach the position
}
for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
Serial.println(pos);
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(150); // waits 15ms for the servo to reach the position
}
}
And this is the result:
0<\r><\n>
0<\r><\n>
1<\r><\n>
2<\r><\n>
3<\r><\n>
4<\r><\n>
5<\r><\n>
6<\r><\n>
7<\r><\n>
8<\r><\n>
9<\r><\n>
10<\r><\n>
11<\r><\n>
<\r><\n>
Exception (0):<\r><\n>
epc1=0x40224c5f epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000<\r><\n>
<\r><\n>
ctx: sys <\r><\n>
sp: 3ffffde0 end: 3fffffb0 offset: 01a0<\r><\n>
<\r><\n>
>>>stack>>><\r><\n>
3fffff80: 8101a8c0 40224779 00000002 3fffdcb0 <\r><\n>
3fffff90: 4020921b 3fff031c 00000000 3fff031c <\r><\n>
3fffffa0: 3fff0134 3fffdc80 3fffdab0 40000f49 <\r><\n>
<<<stack<<<<\r><\n>
<\r><\n>
ets Jan 8 2013,rst cause:2, boot mode:(1,7)<\r><\n>
<\r><\n>
<\r><\n>
ets Jan 8 2013,rst cause:4, boot mode:(1,7)<\r><\n>
<\r><\n>
wdt reset
Also with nothing connected to the ESP the result is the very same.
Any ideas?