Cerca nel forum:
Acquaportal - Forum e Community

  





Benvenuti sul Forum di AcquaPortal, la più grande community italiana di acquariofilia!
Sul Forum di AcquaPortal puoi discutere con altri appassionati di acquariofilia, tenere un tuo Blog personale, inserire foto e video, chattare, ed aiutarci a creare un grande database con schede di pesci, invertebrati e prodotti di acquariofilia.


Per entrar a far parte della comunità occorre registrarsi.
Per farlo premi su

Registrazione


Al momento della registrazione ti verrà richiesto di accettare il Regolamento che ti consigliamo di leggere attentamente.
Ti consigliamo inoltre di leggere le FAQ per apprendere le funzionalità principali del forum.
Se invece sei un utente registrato e hai dimenticato i tuoi dati di accesso devi effettuare il Recupero dati.




Tecnica marino Per parlare della vasca, del mobile, della sump, dell'impianto idraulico, delle attrezzature e degli accessori (pompe, filtri, schiumatoi, reattori, ecc).

 
Prev Messaggio precedente   Prossimo messaggio Next
Vecchio 06-04-2011, 22:46   #11
lucaeff
Guppy
 
Registrato: Dec 2003
Città: Castelnuovo Monti - Reggio Emilia
Acquariofilo: Marino
N° Acquari: 1
Età : 55
Messaggi: 218
Foto: 0 Albums: 1
Post "Grazie" / "Mi Piace"
Grazie (Dati): 0
Grazie (Ricev.): 0
Mi piace (Dati): 0
Mi piace (Ricev.): 0
Mentioned: 0 Post(s)
Feedback 0/0%

Annunci Mercatino: 0
errore nella compilazione del wifi
Quote:
#include*<Wire.h>
#include*<EEPROM.h>
#include*<OneWire.h>
#include*<Time.h>
#include*<DS1307RTC.h>
#include*<NokiaLCD.h>
#include*<ReefAngel.h>
/************************************************** ************************************************** ************************************************** ***************************/
/*

If*your*network*uses*WEP*authentication,*please*ch ange*the*following*defines:
WLAN_AUTH*MODE
WLAN_WEP_KEY
WLAN_WEP_NUM
WLAN_SSID

If*your*network*uses*WPA1*or*WPA2*authentication,* please*change*the*following*defines:
WLAN_AUTH*MODE
WLAN_WLAN_PHRASE
WLAN_SSID

*/

/************************************************** ************************************************** ************************************************** ***************************/

/*
WLAN_AUTH*MODE
Wireless*Authentication*Mode
0*Open*(Default)
1*WEP8
2*WPA1
3*Mixed*WPA1*&*WPA2-PSK
4*WPA2-PSK
5*Not*Used
6*Adhoc,*Join*any*Adhoc*network
*/
#define*WLAN_AUTH_MODE*1**//WEp8 authentication mode

/*
WLAN_WEP_KEY
Wireless*WEP*Key*for*WEP8*authentication*mode
*/
#define*WLAN_WEP_KEY*"xxxxxxxxxxxxxxxxxxxxxxxxxx" //WEP8 key - change if using WEP8 authentication mode

/*
WLAN_WEP_NUM
Wireless*WEP*Key*to*be*used*for*WEP8*authentica tion*mode
*/
#define*WLAN_WEP_NUM*1**//WEP8 key to be used - change if using WEP8 authentication mode

/*
WLAN_PHRASE
Wireless*Passphrase*for*WPA1*or*WPA2*authenticatio n*mode
*/
#define*WLAN_PHRASE*"xxxxxxxxx" //WPA1 or WPA2 pass phrase - change if using WPA1 or WPA2 authentication mode

/*
WLAN_SSID
Wireless*SSID*to*associate*with
*/
#define*WLAN_SSID*"xxxxxxxxxx" //change to your SSID
/************************************************** ************************************************** ************************************************** ***************************/

void setup()
{
**int waitbutton=false;
**int status=false;
**char conn[5];
**int connindex=0;
**char ip[17];
**int ipindex=0;
**unsigned long lastmillis;
**ReefAngel.Init();**// Initialize
**ReefAngel.LCD.Clear(255,0,0,131,131);**// Clear screen
**ReefAngel.LCD.DrawText(0xE0,*255,*40,*5,"Wifi Setup"); // Draw text
**ReefAngel.LCD.DrawText(0xE0,*255,*25,*45,"Press Joystick"); // Draw text
**ReefAngel.LCD.DrawText(0xE0,*255,*32,*65,"to continue"); // Draw text
**ReefAngel.LCD.Clear(0,0,15,131,15);**// Clear screen
**
**do
**{
****if (ReefAngel.Joystick.IsButtonPressed()) waitbutton=true;
**}
**while (!waitbutton);
**ReefAngel.LCD.Clear(255,0,16,131,131);**// Clear screen
**
**delay(1000);
**Serial.end();
**delay(100);
**Serial.begin(9600);
**delay(100);
**
**Serial.println("exit"); // exit setup mode
**delay(100); // wait .1 sec
**Serial.flush(); // Flush incoming serial
**delay(100); // wait .1 sec
**Serial.print("$$$"); // enter setup mode
**delay(300); // wait .3 sec
**Serial.println("set u b 57600"); // set baud 57600
**delay(100); // wait .1 sec
**Serial.println("save");
**delay(100); // wait .1 sec
**Serial.flush(); // Flush incoming serial
//****Serial.print("join*");
//****Serial.println(WLAN_SSID);
//****delay(750);**//**wait*1*sec
//****Serial.flush();***//*Flush*incoming*serial
**Serial.println("reboot");
**delay(500); // wait .5 sec
**Serial.flush(); // Flush incoming serial
*
**Serial.end();
**delay(100);
**Serial.begin(57600);
**delay(100);
**

**setupwifistart:
**Serial.println("exit"); // exit setup mode
**delay(100); // wait .1 sec
**Serial.flush(); // Flush incoming serial
**delay(100); // wait .1 sec
**Serial.print("$$$"); // enter setup mode
**delay(300); // wait .3 sec
**Serial.println("show c"); // request connection status
**delay(100); // wait .1 sec
**lastmillis=millis();
**do // flush serial until get 8, which is always constant on the connection status value.
**{
****if (Serial.available()>0) conn[0] = Serial.read();
****if (conn[0] == '8')
****{
******connindex++;
******status=true;
****}
****if (millis()-lastmillis>2000) goto setupwifistart;
**}
**while (!status);
**status=false;
**lastmillis=millis();
**do // Acquire 4 bytes of data representing the connection status
**{
****if (Serial.available()>0) conn[connindex++] = Serial.read();
****if (connindex > 3)
****{
******conn[4]=0;
******Serial.flush(); // Flush incoming serial
******ReefAngel.LCD.DrawText(0,*255,*10,*25,"Status:"); // Draw text
******ReefAngel.LCD.DrawText(0,*255,*90,*25,conn); **// Draw text
******status=true;
****}
****if (millis()-lastmillis>2000) goto setupwifistart;
**}
**while (!status);

**if (conn[2]=='3') // check if wifi attachment is already setup
**{
****ReefAngel.LCD.DrawText(0,*255,*10,*35,"Already Setup"); // Draw text
****ReefAngel.LCD.DrawText(0,*255,*10,*45,"Exiting..."); // Draw text
****Serial.println("exit"); // exit setup mode
****delay(100); // wait .1 sec
****Serial.flush(); // Flush incoming serial
**}
**else
**{
****if (WLAN_AUTH_MODE==1)
****{*
******//ReefAngel.LCD.DrawText(0, 255, 10, 35,"set wlan key "); // Draw text
******//ReefAngel.LCD.DrawText(0, 255, 90, 35,WLAN_WEP_KEY); // Draw text
******Serial.print("set w k "); // set wlan wep key
******Serial.println(WLAN_WEP_KEY);
******delay(1000); // wait 1 sec
******Serial.flush(); // Flush incoming serial
******//ReefAngel.LCD.DrawText(0, 255, 10, 45,"set wlan num "); // Draw text
******//ReefAngel.LCD.DrawText(0, 255, 90, 45,WLAN_WEP_NUM); // Draw text
******Serial.print("set w n "); // set wlan wep key number
******Serial.println(WLAN_WEP_NUM);
******delay(1000); // wait 1 sec
******Serial.flush(); // Flush incoming serial
****}
****if (WLAN_AUTH_MODE==2 || WLAN_AUTH_MODE==3 || WLAN_AUTH_MODE==4)
****{*
******//ReefAngel.LCD.DrawText(0, 255, 10, 35,"set wlan phrase "); // Draw text
******//ReefAngel.LCD.DrawText(0, 255, 10, 45,WLAN_PHRASE); // Draw text
******Serial.print("set w p "); // set wlan passphrase for WAP1/WAP2
******Serial.println(WLAN_PHRASE);
******delay(1000); // wait 1 sec
******Serial.flush(); // Flush incoming serial
****}
****//ReefAngel.LCD.DrawText(0, 255, 10, 55,"set wlan ssid "); // Draw text
****//ReefAngel.LCD.DrawText(0, 255, 10, 65,WLAN_SSID); // Draw text
****Serial.print("set w s "); // set wlan ssid
****Serial.println(WLAN_SSID);
****delay(1000); // wait 1 sec
****Serial.flush(); // Flush incoming serial
****//ReefAngel.LCD.DrawText(0, 255, 10, 75,"set ip localport 80"); // Draw text
****Serial.println("set i l 2000"); // set ip port
****delay(100); // wait .1 sec
****Serial.flush(); // Flush incoming serial
****//ReefAngel.LCD.DrawText(0, 255, 10, 85,"set comm close 0"); // Draw text
****Serial.println("set c c 0"); // set comm close to nothing
****delay(100); // wait .1 sec
****Serial.flush(); // Flush incoming serial
****//ReefAngel.LCD.DrawText(0, 255, 10, 95,"set comm open 0"); // Draw text
****Serial.println("set c o 0"); // set comm open to nothing
****delay(100); // wait .1 sec
****Serial.flush(); // Flush incoming serial
****//ReefAngel.LCD.DrawText(0, 255, 10, 105,"set comm remote 0"); // Draw text
****Serial.println("set c r 0"); // set comm remote to nothing
****delay(100); // wait .1 sec
****Serial.flush(); // Flush incoming serial
****Serial.println("set c i 3"); // set comm idle to 3
****delay(100); // wait .1 sec
****Serial.flush(); // Flush incoming serial
****Serial.println("set c s 2048"); // set comm IP packet size to 2048
****delay(100); // wait .1 sec
****Serial.flush(); // Flush incoming serial
****Serial.println("set s p 0"); // set system printlvl 0
****delay(100); // wait .1 sec
****Serial.flush(); // Flush incoming serial

//****ReefAngel.LCD.DrawText(0,*255,*10,*75,"set*wla n*channel*0");**//*Draw*text
//****Serial.println("set*wlan*channel*0");**//*set*scan*channel
//****delay(750);**//**wait*1*sec
//****Serial.flush();***//*Flush*incoming*serial
//****ReefAngel.LCD.DrawText(0,*255,*10,*85,"set*wla n*join*1");**//*Draw*text
//****Serial.println("set*wlan*join*1");
//****delay(750);**//**wait*1*sec
//****Serial.flush();***//*Flush*incoming*serial
//****ReefAngel.LCD.DrawText(0,*255,*10,*95,"set*wla n*auth*");**//*Draw*text
//****//ReefAngel.LCD.DrawText(0,*255,*60,*95,*WLAN_AUTH_M ODE);**//*Draw*text
//****Serial.print("set*wlan*auth*");
//****Serial.println(WLAN_AUTH_MODE);
//****delay(750);**//**wait*1*sec
//****Serial.flush();***//*Flush*incoming*serial


****Serial.println("save");
****delay(100); // wait .1 sec
****Serial.flush(); // Flush incoming serial
//****Serial.print("join*");
//****Serial.println(WLAN_SSID);
//****delay(750);**//**wait*1*sec
//****Serial.flush();***//*Flush*incoming*serial
****Serial.println("reboot");
****delay(500); // wait .5 sec
****Serial.flush(); // Flush incoming serial
**}
**getipstart:
**
**Serial.println("exit"); // exit setup mode
**delay(100); // wait .1 sec
**Serial.flush(); // Flush incoming serial
**delay(100); // wait .1 sec
**Serial.print("$$$"); // enter setup mode
**delay(300); // wait .3 sec
**Serial.println("get ip"); // request connection status
**delay(100); // wait .1 sec
**for (int a=0; a<2; a++)
**{**
****status=false;
****lastmillis=millis();
****do // flush serial until get 8, which is always constant on the connection status value.
****{
******if (Serial.available()>0) conn[0] = Serial.read();
******if (conn[0] == 'I')
******{
********connindex++;
********status=true;
******}
******if (millis()-lastmillis>2000) goto getipstart;
****}
****while (!status);
**}
**for (int a=0; a<2; a++) if (Serial.available()>0) conn[0] = Serial.read();
**status=false;
**do // Acquire 4 bytes of data representing the connection status
**{
****if (Serial.available()>0) ip[ipindex++] = Serial.read();
****if (ip[ipindex - 1] == '\r')
****{
******ip[--ipindex]=0;
******Serial.flush(); // Flush incoming serial
******ReefAngel.LCD.DrawText(0,*255,*10,*115,ip);* *// Draw text
******status=true;
****}
****if (ipindex > 16) ipindex=16;
****if (millis()-lastmillis>2000) goto getipstart;
**}
**while (!status);
**Serial.println("exit"); // exit setup mode
**delay(100); // wait .1 sec
**Serial.flush(); // Flush incoming serial
**endline:
**delay(100);
}


void loop()
{
}
__________________
lucaeff non è in linea   Rispondi quotando
 

Tag
angel , reef
Opzioni
Visualizzazione

Regole d'invio
Non puoi inserire discussioni
Non puoi inserire repliche
Non puoi inserire allegati
Non puoi modificare i tuoi messaggi

BB code è attivo
Le smile sono attive
Il codice IMG è attivo
il codice HTML è disattivato

Vai a



















Tutti gli orari sono GMT +2. Attualmente sono le 04:49. Powered by vBulletin versione 3.8.9
Copyright ©: 2000 - 2026, Jelsoft Enterprises Ltd.
Traduzione italiana Team: AcquaPortal Feedback Buttons provided by Advanced Post Thanks / Like v3.5.0 (Lite) - vBulletin Mods & Addons Copyright © 2026 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.5 Patch Level 2 (Lite) - vBulletin Mods & Addons Copyright © 2026 DragonByte Technologies Ltd.
Copyright Zero Pixel Srl
Page generated in 0,72225 seconds with 14 queries