Operate from Blackberry/Android/Iphone-Ipad/Nokia/PC/Mac across the Globe W/O PC

Turkeybaster:
what did you use to build the android application ?

We used standard Android SDK on Eclipse. App supports VPN communications, private and/or public address, so that network latency is tuned to connection speed. Much work is still to be done, but the app is working properly so far.

Hi guys:
I see you have also problems with latency
I was testing very ways to do a Arduino Web Sever
with the library Tinywebserver ist actually very good.....but i would like to build other kind of controls like real time sliders and not only on/of buttons.

My issue is:

Is it posible to send UDP messages between arduino and the web based user interface with the Tinywebserver library??

I comunicate the arduino board with Internet in two ways:

The software tool VVVV: is there a node which made all the hard job for you and works great....but
VVVV works just for rapid prototyping but im not sure that a "vvvv based user interface" could be a" end user" solution.

The other way is a PHP based web server. it works very nice and fast when you use UPD messages..but the problem the server is my PC not the Arduino Board....

anybody is working in the same Problem?
thanks

Hi,

the web browser user HTTP to access the webpage, so there is no way to drive HTTP over UDP with a standard browser. Maybe browser like Firefox has plugins that allow this mode.

Regards,
Dario.

Hi.
Thank you really much for your answer!
Im playing with your Soullis Proyect..Hey guys you are really "Other stuff"
I wanted to make an Arduino Stepper Motor Server..but obviusly with a friendly UI.. and Voila here came Souliss
I was testing all posible and existent tutorials and documentation but your proyect is the best example in Internet..
I really appreciate your input..
Edy

Hi all,

I'm currently using tinywebserver with some relays to turn on & off stuff in my office.

I'm wondering how to input code to read sensors like LM35 and output it onto the html files used in tinywebserver.

I'm using this as reference:

/*
  Web  Server
 
 A simple web server that shows the value of the analog input pins.
 using an Arduino Wiznet Ethernet shield. 
 
 Circuit:
 * Ethernet shield attached to pins 10, 11, 12, 13
 * Analog inputs attached to pins A0 through A5 (optional)
 
 created 18 Dec 2009
 by David A. Mellis
 modified 4 Sep 2010
 by Tom Igoe
 
 */

#include <SPI.h>
#include <Ethernet.h>

// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 192,168,1, 177 };

// Initialize the Ethernet server library
// with the IP address and port you want to use 
// (port 80 is default for HTTP):
Server server(80);

void setup()
{
  // start the Ethernet connection and the server:
  Ethernet.begin(mac, ip);
  server.begin();
}

void loop()
{
  // listen for incoming clients
  Client client = server.available();
  if (client) {
    // an http request ends with a blank line
    boolean currentLineIsBlank = true;
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();
        // if you've gotten to the end of the line (received a newline
        // character) and the line is blank, the http request has ended,
        // so you can send a reply
        if (c == '\n' && currentLineIsBlank) {
          // send a standard http response header
          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: text/html");
          client.println();

          // output the value of each analog input pin
          for (int analogChannel = 0; analogChannel < 6; analogChannel++) {
            client.print("analog input ");
            client.print(analogChannel);
            client.print(" is ");
            client.print(analogRead(analogChannel));
            client.println("
");
          }
          break;
        }
        if (c == '\n') {
          // you're starting a new line
          currentLineIsBlank = true;
        } 
        else if (c != '\r') {
          // you've gotten a character on the current line
          currentLineIsBlank = false;
        }
      }
    }
    // give the web browser time to receive the data
    delay(1);
    // close the connection:
    client.stop();
  }
}

But it uses client.println to display the data.

I need some help on this.

Nic

hi Capper

I want to intergrate XBEE communications through the webserver. Just one xbee to remote control 4 relays.

I have a working sketech that can remotely control the XBEEs using API commands but I want to know what section of the webserver would be appropriate to insert the xbee controls in.

I was thinking in place of having the buttons control pins on the arduino, the webserver directly dispatches the appropriate API commands to remotely control the relays. the code I have pasted below just toggles pin D1 on the remote xbee on and off. I want to be able to do that with this webserver.

//#include <Wire.h>

//frame for router D1 on
byte Router_on[] = {0x7E,0x00,0x10,0x17,0x01,0x00,0x13,0xA2,0x00,0x40,0x79,0x5F,0x90,0xFF,0xFE,0x02,0x44,0x31,0x05,0x11};
//Frame for router D1 off
byte Router_off[] ={0x7E,0x00,0x10,0x17,0x01,0x00,0x13,0xA2,0x00,0x40,0x79,0x5F,0x90,0xFF,0xFE,0x02,0x44,0x31,0x04,0x12};

void setup()
{
Serial.begin(9600);
delay(5000);//delay of 5 seconds to ensure router and coordinator are joined to each other
//delay not entirely necessary
}

void loop(){
//after various trials serial.print(Router_on,20); kept causing the overloaded ambiguous error
//Serial.write(Router_on,20); does it with no problems
//the 20 tells the compiler how long the array is
//Thank you PaulS from the Arduino forum for helping with this

Serial.write(Router_on, 20);
delay(2000);
Serial.write(Router_off, 20);
delay(2000);

}

also do you have any tips on how to reduce the latency with the buttons on the web app and actually controlling the pins on the arduino? what is causing the latency?

Thank you.

hey everyone.

I integrated my XBEE API commands into Cappers webserver. it works like a charm on my Etherten.

There is still an issue with the buttons taking awhile to load on regardless of the browser. I was wondering if using Data URI in place of CSS sprites will improve that latency. any suggestions will be great.

HomeAutomation_V_1_7.ino (13.4 KB)

Great Work,

where to download the code ?

capper:
dear guys
Actual Password is 4587
and its encrypted!!!! 8)

Check this out for more explanation
Dynamic Drive DHTML Scripts- Encrypted Password script

this is just hyperlink to actual 4587.htm file in the programme, you can substitute your password and calculate the encrypted value from above link. ( you must change destination html file name with your password)

Isn't this Cool? 8)

I'm not that good with HTML but isn't this extremely easy to hack? If you can see the root dir of the site you will see the html file in plain txt? how secure is this.

Anyone?

foolix:

capper:
dear guys
Actual Password is 4587
and its encrypted!!!! 8)

Check this out for more explanation
Dynamic Drive DHTML Scripts- Encrypted Password script

this is just hyperlink to actual 4587.htm file in the programme, you can substitute your password and calculate the encrypted value from above link. ( you must change destination html file name with your password)

Isn't this Cool? 8)

I'm not that good with HTML but isn't this extremely easy to hack? If you can see the root dir of the site you will see the html file in plain txt? how secure is this.

Hi Foolix,

You can try "http basic authentication".

Regards,
Nic

Any ideas about how to display analogue values or variables in this platform?

hi Capper
Please help me i am not able to download the attached files of #4 and #34 which is attached by you it says "url not found".

I have same problem, can´t download any file.

Hi Capper.
Thank you for this great application.
I would like to replace one (the first) line into displaying an analog value e.g. a temperature.
Can you help me a bit how to display a value of "analogRead(i)" ?

Jes

capper:
Dear Veseo,

Thank you for being Torch-Bearer,

I must confess that I am not a good coder, but I am good at adaptation.

I was thinking to offload webpage from Arduino to any damn web-server as Arduino is not suitable for this kind of workload.

the Arduino sketch remains same for IDE 1.01 other than you have to substitute "Server" to "Ethernetserver" and "Client" to "EthernetClient".
Attached below Arduino sketch and Htmlpart.zip.

  1. Upload AjaxUI.ino to arduino
  2. Extract htmlpart.zip to your Pc/Mac/Phone/Tablet
  3. Open Index.htm in your browser give password 4587 and hit submit. (don't press enter/return)
  4. connect LED on pin 9 and GND
  5. Have Fun

Warm Regards

Capper

I am having some problems with this...After changing the ip address in the main.js script to my arduino's ip, now at least when I open the UI I can see the rx and tx led's flash on my ethernet shield so I believe I am close to getting this to work, my problem is the on/off toggle on the web page will not work it just stays off (greyed out). Any ideas as to what I am doing wrong here would be appreciated.

Thanks!

Hi Guys,
I´m trying and trying and still comes one message : "F" was not declared in this scope,(caused in line: web_server << F("Could not parse URL"):wink: what's wrong.
Please help I'm desperate.
THANKS

HI I adopted the code that was posted by @zoomkat and tried to extend it a bit by using adding a timed function.

My project in a nutshel, my aim is to control lights from the internet and put them in timed control as well. I will be switching between two modes using a physical button to start with. I have the timed control working separately and the webserver working separately. The problem I am having is combining the two codes. When the switch is high its supposed to go to the timed function and turn on/off the lights according to the set times, its not doing so at the moment. Please help any pointers?

The other problem is I can access the web page on my laptop but not on my phone pr any other laptop. The ES is stacked on to the UNO and the uno is connected to my laptop via ethernet cable and laptop is connect to a wireless network. The code is below:

I have attached the code

Webserver___Timer_forum.ino (7.59 KB)

Hi,
Nice works!!!

working great from last 8 days, nonstop..