Fail programing a Sonoff Dual with Arduino IDE 1) I have a Sonoff Dual, which I wish to upload a Sketch.

2) Other Sonoff basic devices programed the same way, with succes.
But when uploading  the sketch the ( even the generic Blink sketch ) - I do not get any response from the Sonoff device.

3) pins were soldered correctly according this tutorial

4) Uploading the sketch succeeds, using FTDI set to 3.3v.

What might be the reason for it ? What can I do more to check it ? my only guess is that something has happened to Sonoff device - but it uploads successfully.

Guy

Code (edit2)

    /*
  Blink

  Turns 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, MEGA and ZERO
  it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
  the correct LED pin independent of which board is used.
  If you want to know what pin the on-board LED is connected to on your Arduino
  model, check the Technical Specs of your board at:
  https://www.arduino.cc/en/Main/Products

  modified 8 May 2014
  by Scott Fitzgerald
  modified 2 Sep 2016
  by Arturo Guadalupi
  modified 8 Sep 2016
  by Colby Newman

  This example code is in the public domain.

  http://www.arduino.cc/en/Tutorial/Blink
*/
#define LED_BUILTIN 12
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
  Serial.begin(9600);
  delay(2000);
  Serial.println("HELLLLLLO");
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}


Upload

Build options changed, rebuilding all
Sketch uses 251224 bytes (50%) of program storage space. Maximum is 499696 bytes.
Global variables use 28080 bytes (34%) of dynamic memory, leaving 53840 bytes for local variables. Maximum is 81920 bytes.
Erasing 0x80000 bytes starting at 0x00000000
Uploading 255376 bytes from /tmp/arduino_build_214375/Blink.ino.bin to flash at 0x00000000
................................................................................ [ 32% ]
................................................................................ [ 64% ]
................................................................................ [ 96% ]
..........                                                                       [ 100% ]


Addede1: Port Selection:



note: when taken port was not connected ( connects to USB0)

edit3: erasing using esptool.py:

guy@desktop:~$ esptool.py --port /dev/ttyUSB0 --chip esp8266 erase_flash
esptool.py v2.5.0
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP8285
Features: WiFi, Embedded Flash
MAC: 60:01:94:ad:bf:34
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 2.4s
Hard resetting via RTS pin...
Your code is not good to detect if it  works.

The esp8266 Serial needs some time until it prints. First print after the Serial.begin() isn't printed. I guess the reason is the USB chip.

According to schematic, the LED in Sonoff Dual is on pin 12