Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Sonoff Dual R2 offers control of 2 relays on one board. 



GPIOFunction
0Button 0 on header
1Serial Rx and Optional Sensor
3Serial Tx and Optional Sensor
5Relay 2 (RED LED)
9Button 1 on header
10Button on Case
12Relay 1 (GREEN LED)
13Blue Led (Inverted)


Hardware Preperation

This device uses the ESP8285 module which is different than the other SONOFF products. 

...

  • Startup the Arduino IDE
  • Open sonoff.ino
  • Update parameters in user_config.h. 
    • Set the SWITCH_MODE to FOLLOW 

    • Update the wifi settings: STA_SSID1, STA_PASS1, STA_SSID2, STA_PASS2


      Code Block
      #define STA_SSID1              "mywifissid"              // [Ssid1] Wifi SSID
      #define STA_PASS1              "mywifipwd"               // [Password1] Wifi password
      #define STA_SSID2              "mywifissid2"             // [Ssid2] Optional alternate AP Wifi SSID
      #define STA_PASS2              "mywifisspwd2"            // [Password2] Optional alternate AP Wifi password
      
      #define SWITCH_MODE            FOLLOW 
      


  • Set Board Info

    Image Added

Entering Programming Mode

...

From the Arduino IDE, click Sketch → Upload


Reference