Post topics, source code that relate to the Arduino Platform

User avatar
By maptor
#6616
mjtimblin wrote:I don't have a raspberry pi, but I will be able to run a server on a desktop or laptop.


I think you're definitely on the right track for thinking up a successful setup. I might encourage you to try and nab bits and pieces from other peoples' existing projects and modify them to get a hack of what you're after. Then clean things up / rewrite them, maybe even getting some help from here with that.
User avatar
By mjtimblin
#6620
EasyIoT wrote: I'm using ESP8266EasyIoT library. But you gave me good idea. I can prepare EasyIoT server for windows machine. It will be without Raspberry Pi dependent components like NRF24L01 mysensors driver and GPIO driver. Without those components EasyIoT can work on desktop machine.


Thanks for the suggestions and the help. Please keep me updated on your project and your EasyIoT server for a windows machine. I would be very interested.

maptor wrote:I think you're definitely on the right track for thinking up a successful setup. I might encourage you to try and nab bits and pieces from other peoples' existing projects and modify them to get a hack of what you're after. Then clean things up / rewrite them, maybe even getting some help from here with that.


Thanks for the support! I've been doing a lot of research on this. I haven't found much so far, but the encouragement is appreciated! :D
User avatar
By mjtimblin
#6627 Just an update...I think I finally found the solution to the code that I was looking for. I found two Youtube videos that teaches how to send data from a webpage to an ESP8266 and how to have an ESP8266 send data to a webpage. I haven't had a chance to put together the code for the Arduino, but I have had a chance to put together a little bit of code for the webpage. I've included my HTML code, but it still needs quite a bit of work. I've never worked with HTML or PHP before, so I know that I probably made mistakes and missed stuff. The HTML requires another file (jquery.min.js). The link to that file, and the links to other files are in the descriptions of the videos.

Send Data From Webpage to ESP8266 (Toggle Arduino Pins From Webpage)
ESP8266 Send Data To a Website (ESP-01/ESP-12)

Code: Select all<html>
   <head>
      <title>Hanger Thermostat Control</title>
   </head>
   <body>
   <?php
      $var1 = $_GET['currenttemp'];
      $var2 = $_GET['targettemp'];
      echo "Current Temperature: ".$var1."\n";
      echo "Target Temperature: ".$var2."\n";
   ?>
   <br>
   <br>
   <p> Furnace
      <br>
      <button id="11" class="led" style="font-size:100%;width:100px;height:60px;">On/Off</button>
   </p>
   <br>
   <p>
      Temperature
   <br>
   
      <button id="12" class="led" style="font-size:125%;width:50px;height:60px;">-</button>
      <button id="13" class="led" style="font-size:125%;width:50px;height:60px;">+</button>
   </p>
   <script src="jquery.min.js"></script>
   <script type="text/javascript">
      $(document).ready(function(){
         $(".led").click(function(){
            var p = $(this).attr('id'); // get id value (i.e. pin13, pin12, or pin11)
            $.get("http://192.168.4.1:80/", {pin:p}); // execute get request
         });
      });
   </script>
   </body>
</html>
User avatar
By EasyIoT
#8303
mjtimblin wrote:
EasyIoT wrote: I'm using ESP8266EasyIoT library. But you gave me good idea. I can prepare EasyIoT server for windows machine. It will be without Raspberry Pi dependent components like NRF24L01 mysensors driver and GPIO driver. Without those components EasyIoT can work on desktop machine.


Thanks for the suggestions and the help. Please keep me updated on your project and your EasyIoT server for a windows machine. I would be very interested.


Hi. I've prepared Windows release of EasyIoT server. Now it's not limited only to Raspberry Pi.
You can download EasyIoT server here:

http://iot-playground.com/download