magnets wrote:Current Code that does not work:
Well I copied your code, made some little changes (to show debug on serial), and it compiled and ran pretty much fine.
If this does not work, you might have a faulty flash.
Setting on IDE (1.8.2) :
Generic ESP8266 Module, 80MHz, 40MHz, DIO, 115200, 4M (3M SPIFFS), ck,
Disabled, None on COM19
Code:
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
Most Arduinos have an on-board LED you can control. On the Uno and
Leonardo, it is attached to digital pin 13. If you're unsure what
pin the on-board LED is connected to on your Arduino model, check
the documentation at http://www.arduino.cc
This example code is in the public domain.
modified 8 May 2014
by Scott Fitzgerald
*/
//ok lets declare them
int ServoSignal = 4;
int RelaySignal = 5;
int LEDClosed = 12;
int LEDOpen = 13;
int ButtonOpen = 14;
int ButtonAC = 16;
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin 13 as an output.
Serial.begin(115200);
Serial.println("i'm in the setup.");
Serial.println("Setting ServoSignal");
pinMode(ServoSignal, OUTPUT);
Serial.println("Setting RelaySignal");
pinMode(RelaySignal, OUTPUT);
Serial.println("Setting ButtonOpen");
pinMode(ButtonOpen, OUTPUT);
Serial.println("Done");
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(ServoSignal, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(ServoSignal, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
Serial.println("blink");
}
Result on terminal:
r<0>lœØrß<0>Œ#ânÀàŒ‚ìpŒ<Ž‚ß<0>ì8’ßÇ’ÜälpònnäÄ;ònÄ’ÜäŽbŽ#l`$`üpònàÃÜ<0>à‚ÇÀl€ŒœÀ0:32:54.504> €bÀnâãn€$ŽbÀÄ>~ònîÄÁŒŽ<0>l`üÜ#‚nÀrnrŽ’ß;ÄÀ?Œœ;rßÛ’nÀàbÇ’`ÄžÀ€€€rü‚nÄbài'm in the setup.
0:32:54.504> Setting ServoSignal
0:32:54.504> Setting RelaySignal
0:32:54.504> Setting ButtonOpen
0:32:54.504> Done
0:32:56.500> blink
0:32:58.499> blink
0:33:00.502> blink
0:33:02.502> blink
0:33:04.500> blink
0:33:06.502> blink
0:33:08.501> blink