Jump to content


LinkNode R4: Arduino-compatible WiFi relay controller "Factory Reset"


1 reply to this topic

#1 Guest_ha1f3mpty_*

Guest_ha1f3mpty_*
  • Guests

Posted 14 July 2017 - 05:16 PM

I just got my LinkNode R4 the other day. I was able to follow the basic tutorials on the wiki page without any issues. I am able to use the Android app to access the basic IoT switches and the commands are being sent to the relay array. I want to start playing with uploading my own sketches and control the relay array locally, not through the LinkSprite.io site. Before I attempt to do this I want to make sure I can put it back to stock, do a factory reset if you will. I am fairly new to esp8266 and Arduino etc. and I don't know how or if it is possible to read what is currently uploaded to any device. Google searching only showed me how to lock reading. If there was a place to download the stock sketch that is on the LinkNode R4 that would work as well. Thanks in advance for any help. 



#2 TomInIowa

TomInIowa

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 17 August 2017 - 01:55 AM

I don't know if you can "download" what is on the link node to your computer.

 

I think the stock "sketch is the wifi manager one

 

--------

//    http://linksprite.co...tle=LinkNode_D1

 
#include <ESP8266WiFi.h>          //https://github.com/esp8266/Arduino
 
//needed for library
#include <DNSServer.h>
#include <ESP8266WebServer.h>
#include <WiFiManager.h>         //https://github.com/tzapu/WiFiManager
 
 
void setup() {
    // put your setup code here, to run once:
    Serial.begin(115200);
 
    //WiFiManager
    //Local intialization. Once its business is done, there is no need to keep it around
    WiFiManager wifiManager;
    //reset saved settings
    //wifiManager.resetSettings();
 
    //set custom ip for portal
    wifiManager.setAPStaticIPConfig(IPAddress(10,0,1,1), IPAddress(10,0,1,1), IPAddress(255,255,255,0));
 
    //fetches ssid and pass from eeprom and tries to connect
    //if it does not connect it starts an access point with the specified name
    //here  "AutoConnectAP"
    //and goes into a blocking loop awaiting configuration
    wifiManager.autoConnect("LinkNodeAP");
    //or use this for auto generated name ESP + ChipID
    //wifiManager.autoConnect();
 
    //if you get here you have connected to the WiFi
    Serial.println("connected... :)");
}
 
void loop() {
    // put your main code here, to run repeatedly:
}




Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users