Show Posts
Pages: [1]
1  Using Arduino / Sensors / Ds18b20 long wire problem on: February 13, 2013, 04:10:19 pm
Hello, well I'm developing a system to get the temperature but I need put 20 sensors but the distance its too long, so I was trying with cat 5 ethernet cable, first I try with 3 sensor on each wire (using one wire) but I lost many data, so I try with 2 sensors in each wire, and I'm using 220ohm resistors but its change depending the long of the wire, is this ok or what can I do.
2  Using Arduino / Interfacing w/ Software on the Computer / Re: Why I can't connect on: February 13, 2013, 03:55:07 pm
hello I'm back again, the cpanel it's the control paranel from my webSite and I get this data:
Access your websitehttp://arduinosensor.hostzi.com
Access your website with www.http://www.arduinosensor.hostzi.com
Website IP address31.170.160.99
Server nameserver35.000webhost.com
and my code is this:
Code:
#include <SPI.h>
#include <Ethernet.h>

byte mac[] = {  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte gateway[] = { 192, 168, 1, 254 };
byte subnet[] = { 255, 255, 255, 0 };
IPAddress server( 31,170,160,99 );
int s[20];
EthernetClient client;

void setup(){
  Ethernet.begin(mac, gateway, subnet);
  delay(1000);
  Serial.begin(9600);
}
void loop(){
  for(int a=0;a<20;a++){
    s[a]=random(10, 15);
  }
  mysql_ins();
}
void mysql_ins(){
  if (client.connect(server, 80)) {
    client.print("GET /arduino/read.php?s1=");
    client.print(s[0]);
    for(int a=1;a<20;a++){
      client.print("&s");
      client.print(a+1);
      client.print("=");
      client.print(s[a]);
     
    }
    client.println(" HTTP/1.1");
    client.println("Host: localhost");
    client.println();
    Serial.println("ARDUINO: HTTP message sent");
    delay(3000);
    if(client.available()){
      Serial.println("ARDUINO: HTTP message received");
      Serial.println("ARDUINO: printing received headers and script response...\n");

      while(client.available()){
        char c = client.read();
        Serial.print(c);
      }
    }else{
      Serial.println("ARDUINO: no response received / no response received in time");
    }
    client.stop();
  }else{
    Serial.println("connection failure");
  }
}
3  Using Arduino / Interfacing w/ Software on the Computer / Re: Why I can't connect on: February 09, 2013, 06:26:50 pm
I cant see the server log... and how can I know the error?

I am trying to access by the ip 31.170.160.96/home/a9451348 but I can't. In the cpanel show me that ip to acces...
4  Using Arduino / Interfacing w/ Software on the Computer / Why I can't connect on: February 09, 2013, 04:37:52 pm
Hello, well I am new here, and have a question about why I can't connecto to 000webhost via ethernet shield this is my code.
Code:
#include <SPI.h>
#include <Ethernet.h>

byte mac[] = {  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte gateway[] = { 192, 168, 1, 254 };
byte subnet[] = { 255, 255, 255, 0 };
IPAddress server( 192,168,1,65 );
int s[20];
EthernetClient client;

void setup(){
  Ethernet.begin(mac, gateway, subnet);
  delay(1000);
  Serial.begin(9600);
}
void loop(){
  for(int a=0;a<20;a++){
    s[a]=random(10, 15);
  }
  mysql_ins();
}
void mysql_ins(){
  if (client.connect(server, 80)) {
    client.print("GET /arduino/read.php?s1=");
    client.print(s[0]);
    for(int a=1;a<20;a++){
      client.print("&s");
      client.print(a+1);
      client.print("=");
      client.print(s[a]);
     
    }
    client.println(" HTTP/1.1");
    client.println("Host: localhost");
    client.println();
    Serial.println("ARDUINO: HTTP message sent");
    delay(3000);
    if(client.available()){
      Serial.println("ARDUINO: HTTP message received");
      Serial.println("ARDUINO: printing received headers and script response...\n");

      while(client.available()){
        char c = client.read();
        Serial.print(c);
      }
    }else{
      Serial.println("ARDUINO: no response received / no response received in time");
    }
    client.stop();
  }else{
    Serial.println("connection failure");
  }
}
When I do it in my local computer I can acces but, I cant in 000webhost I set the server ip as it show me in the Cpanel.
Pages: [1]