Downloading and installing the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By pranavsharma2504
#65771
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) :
Code: Select allGeneric ESP8266 Module, 80MHz, 40MHz, DIO, 115200, 4M (3M SPIFFS), ck,
 Disabled, None on COM19


Code:
Code: Select all/*
  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:
Code: Select allr<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