Post topics, source code that relate to the Arduino Platform
User avatar
By katz
#25022 @Ragothamann

1. You have to get a recent version of the Arduino IDE ... https://www.arduino.cc/en/Main/Software. Download and intstall it if you don't already have it.

2. Run the IDE and go to the menu bar. Select [File] and then [Preferences]. In the field where it says 'Additional boards manager URL' you enter: http://arduino.esp8266.com/stable/packa ... index.json You can find more about this on Github https://github.com/esp8266/Arduino/blob/esp8266/README.md

3. Next, go to the menu bar and select [Tools and then [Board] and then [Boards manager ...]. Then a window opens and you select 'ESP 8266 by ESP8266 Community'. Then press 'Install'. This may take a while.

4. If all went well, you should find your ESP board in the menu bar, under [Tools] and then [Board] and then, at the bottom 'Generic ESP8266 module'. Also, don't forget to select the richt COM-port.

5. And then finally you should be able to flash my code into your ESP. There is no need to install libraries seperately. It should now start.

Please let us know if you succeeded to get it working. Good luck!!

Peter.
User avatar
By roboticboyer
#26331 Hi Peter
I noted another difference in your code:
Code: Select alljavaScript+="   xmlHttp.open('PUT','xml',true);\n";
javaScript+="   xmlHttp.open('GET','/xml',true);\n";


When you used GET the URI was /xml, after you changed the URI in xml.
Cold the /xml be the error because GET was not working?

PUT is not a standard parameter for xmlHttp.open.

Ciao
Gio
User avatar
By katz
#26401 @Gio,

I don't think that a call with '/xml' makes any difference from a call with 'xml'.

I believe that the PUT is a standard http request method. See this WIKI. The GET will retrieve the data but it will not autmatically refresh the data in de xml-file. The PUT does just that trick. You could probably make it work with the GET but you would have to refresh the XML-data using the loop(). I may try this out ... perhaps next week(?)

By the way, instead of the PUT, the POST also works just fine.

Regards, Peter.