how i make this wifi?

Discussion about the upcoming BlackWidow (WiFi+Duemilanove).

how i make this wifi?

Postby thanosgen » Tue Jul 13, 2010 12:27 pm

i make this code and with serial print works fine.how i make thi code to view this in my browser with ad hoc connection?
Code: Select all
#include <WiServer.h>
#include <string.h>
//#define WIRELESS_MODE_INFRA   1
//#define WIRELESS_MODE_ADHOC   2
#define ledPin1 5
#define ledPin2 6
#define ledPin3 7
#include <SHT1x.h>
#define dataPin  10
#define clockPin 11
#define watpin 12

// Wireless configuration parameters ----------------------------------------
//unsigned char local_ip[] = { 10,1,1,5};   // IP address of WiShield
//unsigned char gateway_ip[] = { 192,168,1,1};   // router or gateway IP address
//unsigned char subnet_mask[] = { 255,0,0,0};   // subnet mask for the local network
//const prog_char ssid[] PROGMEM = { "all"};      // max 32 bytes
//unsigned char security_type = 0;   // 0 - open; 1 - WEP; 2 - WPA; 3 - WPA2
//unsigned char wireless_mode = WIRELESS_MODE_ADHOC;
//unsigned char ssid_len;
//unsigned char security_passphrase_len;
// End of wireless configuration parameters ----------------------------------------


SHT1x sht1x(dataPin, clockPin);
int val;
int water;
int watPin = 12;
int vala;
int ledPin =  13;
void setup()
{
   Serial.begin(9600);
   Serial.println("Starting up");
   pinMode(ledPin, OUTPUT);
   pinMode(watPin,INPUT);
}

void loop()
{
  float temp_c;
  float humidity;

  // Read values from the sensor
  temp_c = sht1x.readTemperatureC();
  temp_f = sht1x.readTemperatureF();
  humidity = sht1x.readHumidity();

  // Print the values to the serial port
  Serial.print("Temperature: ");
  Serial.print(temp_c, DEC);
  Serial.print("C / ");
   Serial.print("F. Humidity: ");
  Serial.print(humidity);
  Serial.println("%");

  delay(2000);
 
   val = analogRead(0);     // read analog input pin 0
  vala=val/10;
Serial.print(vala, DEC);  // prints the value read
  Serial.print("%");
if (vala>=50){
  Serial.print(" o aeras einai molismenos ");
  digitalWrite(ledPin, HIGH);   // set the LED on
  delay(100);                  // wait for a second
  digitalWrite(ledPin, LOW);    // set the LED off
  delay(100);                  // wait for a second
  }
  else {Serial.print(" o aeras einai katharos ");
  }
Serial.print("\n ");      // prints a space between the numbers
  delay(1000); 
  water = digitalRead(watPin);   // read the input pin
    if (water==1){
    Serial.print("exei nero-water full");
   }
   else {Serial.print(" den exei nero-no water ");
  }
   delay(1000);
  Serial.print("\n");
}





SOMETHING IS COOMENTS AND MAKE THIS FOR THE SERIAL PRINT THE WIFI I UNDERSTAND GHOW IT WORKS BUT THE Wiserver,print '' '; i cannot...
thanosgen
 
Posts: 10
Joined: Thu Mar 25, 2010 1:00 am

Return to BlackWidow

Who is online

Users browsing this forum: No registered users and 1 guest