AcquaPortal Forum Acquario Dolce e Acquario Marino

AcquaPortal Forum Acquario Dolce e Acquario Marino (http://www.acquariofilia.biz/forum.php)
-   Tecnica marino (http://www.acquariofilia.biz/forumdisplay.php?f=57)
-   -   Reef Angel (http://www.acquariofilia.biz/showthread.php?t=296451)

LukeLuke 05-04-2011 16:10

io credo che la prima cosa che devi fare è connettere (con lo stesso cavo TTL -> USB che usi per programmare RA) il modulo WIFI al computer...

poi seguire le istruzioni che trovi nel manuale sotto la sezione "Manual Setup of your Reef Angel Wifi attachment"

da quello che ho capito, il modulo wifi non è una semplice scheda passiva... ma nella sua stessa memoria risiedono tutti i dati di configurazione del WIFI.... quindi lo devi configurare....

Psyco 05-04-2011 16:14

spetta che provo...

Psyco 05-04-2011 16:46

mmm...nn ricevo niente nel sul tera term ne su zterm...casino

LukeLuke 05-04-2011 16:48

hai settato correttamente le velocità ?

Psyco 05-04-2011 17:13

risolto...allora...nel caso in cui il pde wifi setup vi dia errori seguite la guida e scaricate tera term...fate come descritto...se..dico se...per caso con la connessione tera term a 9600 non ricevete nessuna scritta...chiudete il programma, settate la connessione a 57600 e premete ok..poi collegate il wifi...a questo punto con la schermata bianca digitate $$$ e come per magia apparirà la scritta CMD...a questo punto impostate da qui i parametri...

LukeLuke 05-04-2011 17:15

viva le cose a manella!!!!

per me il livello più basso di programmazione è sempre il migliore :-D

LukeLuke 05-04-2011 17:26

se volete personalizzare quali prese devono essere accese o spente durante il feeding mode, water change

basta inserire le seguenti linee nel setup():

void setup()
{
ReefAngel.Init(); //Initialize controller

// Set the ports that get toggled on & off during the following modes
// To enable a port to be toggled, place a 1 in the appropriate position
// Uncomment and update as needed
// Port 87654321
//ReefAngel.FeedingModePorts = B10011100;
//ReefAngel.WaterChangePorts = B10011100;
//ReefAngel.OverheatShutoffPorts = B00001100;
//ReefAngel.LightsOnPorts = B00000110;

}

Se per esempio volete spengere le pompe di movimento durante la fase di feeding-mode, prendiamo per esempio che le pompe di movimento sono la 3 e 4, basterà fare in modo che siano a ZERO.

void setup()
{
ReefAngel.Init(); //Initialize controller

// Set the ports that get toggled on & off during the following modes
// To enable a port to be toggled, place a 1 in the appropriate position
// Uncomment and update as needed
// Port 87654321
ReefAngel.FeedingModePorts = B10010000;
//ReefAngel.WaterChangePorts = B10011100;
//ReefAngel.OverheatShutoffPorts = B00001100;
//ReefAngel.LightsOnPorts = B00000110;

}

OK ?

Psyco 05-04-2011 17:43

come ti dicevo per mp luke..per me non ci son problemi hihih...ormai nel mondo dei pc ne ho viste di tutti i colori..quindi mi adatto...mi spiace solo per quelli che si trovan in difficoltà...però basta chieder...il prossimo passo ora è cambiare il webbanner in modo che visualizzi le doso invece delle pompe di movimento...

rita87 05-04-2011 17:52

Quote:

Originariamente inviata da Psyco (Messaggio 3548544)
come ti dicevo per mp luke..per me non ci son problemi hihih...ormai nel mondo dei pc ne ho viste di tutti i colori..quindi mi adatto...mi spiace solo per quelli che si trovan in difficoltà...però basta chieder...il prossimo passo ora è cambiare il webbanner in modo che visualizzi le doso invece delle pompe di movimento...

GENTE CHE ARRANCA :-D
io ho problemi solo di sketch too big -.- Per ora ho un pde un pò limitato però in features non c'è rimasto quasi niente + e su arduino c'è scritto di togliere qualche #include, ma poi da errori ovviamente....
Per le pompe che valori posso mettere per alternarle?
------------------------------------------------------------------------
Tramite joystick

Psyco 05-04-2011 17:59

se vuoi simulare le maree dovresti metter 6 ore e 15 min circa

Psyco 05-04-2011 18:15

pian piano
http://www.reefangel.com/status/imag....aspx?id=Psyco


non guardate i valori...non ho collegato sonda ph ne temp...strano però che segni il ph...bah

Athos78 05-04-2011 19:54

Quote:

Originariamente inviata da Psyco (Messaggio 3548598)
pian piano
http://www.reefangel.com/status/imag....aspx?id=Psyco


non guardate i valori...non ho collegato sonda ph ne temp...strano però che segni il ph...bah

Sai che sei prenotato per venire a settare il mio vero!! :-)) Così poi mi spiegi un pò come funziona e vedo se mi metto a programmare qualcosina pure io .... vi giuro che fra un casino e l'altro ho giusto avuto il tempo di accenderlo!! -:33

In cambio ci posso mettere una cena -28

Psyco 05-04-2011 20:07

gh gh ...figurati..però mi prenoto per qualche scambio di talee in futuro...comunque ho settato tutto il wifi...funziona tutto finalmente..domani passo alla gestione delle dosometriche tenendo ativato il webbannerluke preparati che ti devo chieder 2 cosette...per oggi basta...a domaniiiii

lucaeff 05-04-2011 20:29

Quote:

puoi provare così:

nel file .pde sopra al void setup() inserisci questo:

void RitardoSkimmer(byte SKPort, byte SKDelay)
{
unsigned int SKTimer = SKDelay;
SKTimer *= SECS_PER_MIN;
if ( now()-RAStart > SKTimer )
ReefAngel.Relay.On(SKPort);
}

Poi nella sezione loop() del .pde inserisci questo:

RitardoSkimmer(Port4,60)

dovrebbe funzionare .... provate ... :-D

allora utilizzo il file RAMenus
inserisco la prima parte sopra al void setup()
provo a compilare e ok
inserisco RitardoSkimmer(Port4,60)
riprovo a compilare ma mi dà sempre errore

rita87 05-04-2011 22:11

Quote:

Originariamente inviata da lucaeff (Messaggio 3548826)
Quote:

puoi provare così:

nel file .pde sopra al void setup() inserisci questo:

void RitardoSkimmer(byte SKPort, byte SKDelay)
{
unsigned int SKTimer = SKDelay;
SKTimer *= SECS_PER_MIN;
if ( now()-RAStart > SKTimer )
ReefAngel.Relay.On(SKPort);
}

Poi nella sezione loop() del .pde inserisci questo:

RitardoSkimmer(Port4,60)

dovrebbe funzionare .... provate ... :-D

allora utilizzo il file RAMenus
inserisco la prima parte sopra al void setup()
provo a compilare e ok
inserisco RitardoSkimmer(Port4,60)
riprovo a compilare ma mi dà sempre errore

Tanto non funziona il ritardo... in pratica non ritarda, domani mi ci metto d'impegno!
------------------------------------------------------------------------
Quote:

Originariamente inviata da Psyco (Messaggio 3548577)
se vuoi simulare le maree dovresti metter 6 ore e 15 min circa

:-D ho capito, ma sul controller le pompe partono insieme.

Esempio: se metto 5 secondi alla prima e 5 alla seconda, queste si attivano x 5 secondi in modo simultaneo.
Per il PH lo rileva anche a me, pur non avendo inserito la sonda.

lucaeff 05-04-2011 22:26

ma possibile che sono il più ritardato di tutti???? :-(
non riesco a fare niente
nel il ritardo dello skimmer e nemmeno la configurazione WIFi mi riesce
aaaaaaaaaaaaaaaarrrrrrrrrrrrrrrrrrrrrrrrgggggggggg ggggggggghhhhhhhhhhhhhhhhhhhhh-76

non capisco una cosa se la mia chiave di rete wep è di 13 cifre come faccio a farle diventare 26??
quando collego tramite wifi un qualsiasi altro apparecchio inserisco la chiave di rete e bon senza password
------------------------------------------------------------------------
[QUOTE=rita87;3549273]
Quote:

Originariamente inviata da lucaeff (Messaggio 3548826)
Quote:

puoi provare così:

nel file .pde sopra al void setup() inserisci questo:

void RitardoSkimmer(byte SKPort, byte SKDelay)
{
unsigned int SKTimer = SKDelay;
SKTimer *= SECS_PER_MIN;
if ( now()-RAStart > SKTimer )
ReefAngel.Relay.On(SKPort);
}

Poi nella sezione loop() del .pde inserisci questo:

RitardoSkimmer(Port4,60)

dovrebbe funzionare .... provate ... :-D

allora utilizzo il file RAMenus
inserisco la prima parte sopra al void setup()
provo a compilare e ok
inserisco RitardoSkimmer(Port4,60)
riprovo a compilare ma mi dà sempre errore

Tanto non funziona il ritardo... in pratica non ritarda, domani mi ci metto d'impegno!
------------------------------------------------------------------------
Quote:

Per il PH lo rileva anche a me, pur non avendo inserito la sonda.
anche a mè e per lo più alterna PH 6.16/6.18

Psyco 06-04-2011 07:02

Quote:

Originariamente inviata da lucaeff (Messaggio 3549312)
ma possibile che sono il più ritardato di tutti???? :-(
non riesco a fare niente
nel il ritardo dello skimmer e nemmeno la configurazione WIFi mi riesce
aaaaaaaaaaaaaaaarrrrrrrrrrrrrrrrrrrrrrrrgggggggggg ggggggggghhhhhhhhhhhhhhhhhhhhh-76

non capisco una cosa se la mia chiave di rete wep è di 13 cifre come faccio a farle diventare 26??
quando collego tramite wifi un qualsiasi altro apparecchio inserisco la chiave di rete e bon senza password
------------------------------------------------------------------------


Per quanto riguarda la chiave di rete wep, l'adattatore è compatibile solamente con il wep a 128 bit con chiave a 26 cifre...te stai utilizzando il wep a 64 bit con chiave a 13 cifre, pertanto devi settare wep 128 sul tuo router, creare la chiave e metterla nell' adattatore ed il gioco è fatto...facci sapere

LukeLuke 06-04-2011 08:46

Provate questo per alternare le pompe ogni 6 ore....

setup(){
ReefAngel.Timer[1].Interval=21600; //21600s = 6hr
ReefAngel.Timer[2].Interval=21600; //21600s = 6hr
}

loop(){
if (ScheduleTime(6,0,0)) ReefAngel.Timer[1].Start(); // avvia timer1 alle 06:00:00
if (ScheduleTime(12,00,0)) ReefAngel.Timer[2].Start(); // avvia timer2 alle 12:00:00
if (ScheduleTime(18,00,0)) ReefAngel.Timer[1].Start(); // avvia timer1 alle 18:00:00
if (ScheduleTime(23,59,0)) ReefAngel.Timer[2].Start(); // avvia timer2 alle 24:00:00

if (ReefAngel.Timer[1].IsTriggered()) ReefAngel.Relay.On(pompa1); //Accendi pompa 1
else ReefAngel.Relay.Off(pompa1);

if (ReefAngel.Timer[2].IsTriggered()) ReefAngel.Relay.On(pompa2); //Accendi pompa 2
else ReefAngel.Relay.Off(pompa2);
}

Nel loop() dovete togliere le due righe del WaveMaker.....

Nel caso in cui usiate le dosometriche, se non sbaglio il ReefAngel.Timer[1] e ReefAngel.Timer[2] sono utilizzati per esse.... quindi dovete crearvi dei timer vostri ed utilizzare quelli:

Sotto agli include scrivere:

ReefAngel_TimerClass MyTimer1;
ReefAngel_TimerClass MyTimer2;

void setup()
{
MyTimer1.SetInterval(21600);
MyTimer2.SetInterval(21600);
}

e nel loop() sostituire ReefAngel.Timer[1] con MyTimer1 e ReefAngel.Timer[2] con MyTimer2


Cmq io non sono un programmatore... mi arrabatto.... molte soluzioni alle vostre domande le trovate sul forum o sul google groups... cercate li o al massimo chiedete voi aiuto. ;-)

spero funzioni....

rita87 06-04-2011 10:40

è uguale a quella che avevo preso nello sketchbook di curt, ora riprovo

rita87 06-04-2011 10:56

l'errore infatti è lo stesso:

C:\Users\Greta\Documents\Arduino\libraries\ReefAng el_Timer/ReefAngel_Timer.h: In function 'void setup()':
C:\Users\Greta\Documents\Arduino\libraries\ReefAng el_Timer/ReefAngel_Timer.h:39: error: 'time_t ReefAngel_TimerClass::Interval' is private
RA_Rita2:29: error: within this context
C:\Users\Greta\Documents\Arduino\libraries\ReefAng el_Timer/ReefAngel_Timer.h:39: error: 'time_t ReefAngel_TimerClass::Interval' is private
RA_Rita2:30: error: within this context

ma a te da errore se lo compili?

rita87 06-04-2011 12:27

per non dare errori bisogna scrivere così nel setup
ReefAngel.Timer[1].SetInterval(21600); //21600s = 6hr
ReefAngel.Timer[2].SetInterval(21600); //21600s = 6hr
ho fatto l'upload, ma non si attiva nessuno dei due relè delle pompe

LukeLuke 06-04-2011 12:28

posti il pde ?

MAURINO fABRIZIO 06-04-2011 12:55

Quote:

Originariamente inviata da LukeLuke (Messaggio 3549711)
Cmq io non sono un programmatore... mi arrabatto.... molte soluzioni alle vostre domande le trovate sul forum o sul google groups... cercate li o al massimo chiedete voi aiuto. ;-)

Stai facendo fin troppo Luke,l'aiuto che hai dato a noi utenti del forum,non ha eguali!!!!!!!!!
Sei un grande!!!!!!!!!!!!!!
P.S. grazie al tuo aiuto ora funziona tutto alla perfezione!!!!!!!!!!!!!!e pensate che ero quasi intenzionato a darlo via il reff angel...........e invece.............sei un mito!!!!!!!!!!!!!!
#25#25#25#25#25#25#25#25#25#25#25#25#25#25#25#25#2 5#25#25#25#25#25#25#25#25#25#25#25

LukeLuke 06-04-2011 12:57

Quote:

Originariamente inviata da MAURINO fABRIZIO (Messaggio 3550153)
Quote:

Originariamente inviata da LukeLuke (Messaggio 3549711)
Cmq io non sono un programmatore... mi arrabatto.... molte soluzioni alle vostre domande le trovate sul forum o sul google groups... cercate li o al massimo chiedete voi aiuto. ;-)

Stai facendo fin troppo Luke,l'aiuto che hai dato a noi utenti del forum,non ha eguali!!!!!!!!!
Sei un grande!!!!!!!!!!!!!!
P.S. grazie al tuo aiuto ora funziona tutto alla perfezione!!!!!!!!!!!!!!e pensate che ero quasi intenzionato a darlo via il reff angel...........e invece.............sei un mito!!!!!!!!!!!!!!
#25#25#25#25#25#25#25#25#25#25#25#25#25#25#25#25#2 5#25#25#25#25#25#25#25#25#25#25#25

Grazie...

Ma visto che sono stato io a pubblicizzarlo... faccio il possibile per farlo funzionare ;-)

sono contento che a te funzioni bene.... :-d

LukeLuke 06-04-2011 14:36

se utilizzate i MyTimer per alternare le pompe, dovete aggiungere sotto agli include :

ReefAngel_TimerClass MyTimer1;
ReefAngel_TimerClass MyTimer2;

rita87 06-04-2011 14:48

Quote:

Originariamente inviata da MAURINO fABRIZIO (Messaggio 3550153)

Stai facendo fin troppo Luke,l'aiuto che hai dato a noi utenti del forum,non ha eguali!!!!!!!!!
Sei un grande!!!!!!!!!!!!!!
P.S. grazie al tuo aiuto ora funziona tutto alla perfezione!!!!!!!!!!!!!!e pensate che ero quasi intenzionato a darlo via il reff angel...........e invece.............sei un mito!!!!!!!!!!!!!!
#25#25#25#25#25#25#25#25#25#25#25#25#25#25#25#25#2 5#25#25#25#25#25#25#25#25#25#25#25

E' vero senza i tuoi input lo avrei buttato...
Il pde, lo skimmer però non l'ho modificato

#include <ReefAngel_Features.h>
#include <ReefAngel_Globals.h>
#include <ReefAngel_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <ReefAngel_EEPROM.h>
#include <ReefAngel_NokiaLCD.h>
#include <ReefAngel_ATO.h>
#include <ReefAngel_Joystick.h>
#include <ReefAngel_LED.h>
#include <ReefAngel_TempSensor.h>
#include <ReefAngel_Relay.h>
#include <ReefAngel_PWM.h>
#include <ReefAngel_Timer.h>
#include <ReefAngel_Memory.h>
#include <ReefAngel.h>

void RitardoSkimmer(byte SKPort, byte SKDelay)
{
if (now()-RAStart > SKDelay) ReefAngel.Relay.On(SKPort);
}

void setup()
{
ReefAngel.Init(); //Initialize controller
ReefAngel.SetTemperatureUnit(0);

ReefAngel.Timer[1].SetInterval(21600); //21600s = 6hr
ReefAngel.Timer[2].SetInterval(21600); //21600s = 6hr




// Set the ports that get toggled on & off during the following modes
// To enable a port to be toggled, place a 1 in the appropriate position
// Uncomment and update as needed
// Port 87654321
ReefAngel.FeedingModePorts = B10011000;
ReefAngel.WaterChangePorts = B10011100;
//ReefAngel.OverheatShutoffPorts = B00000000;
ReefAngel.LightsOnPorts = B00000110;

// Ports that are always on
ReefAngel.Relay.On(Port8);
}

void loop()
{
ReefAngel.ShowInterface();

//ReefAngel.Refresh();
//Serial.println(ReefAngel.Params.Temp1);
//Serial.println(ReefAngel.Params.Temp2);
//Serial.println(ReefAngel.Params.Temp3);


//accensione pompe di movimento
if (ScheduleTime(6,0,0)) ReefAngel.Timer[1].Start(); // avvia timer1 alle 06:00:00
if (ScheduleTime(12,00,0)) ReefAngel.Timer[2].Start(); // avvia timer2 alle 12:00:00
if (ScheduleTime(18,00,0)) ReefAngel.Timer[1].Start(); // avvia timer1 alle 18:00:00
if (ScheduleTime(0,00,0)) ReefAngel.Timer[2].Start(); // avvia timer2 alle 24:00:00

if (ReefAngel.Timer[1].IsTriggered()) ReefAngel.Relay.On(Port4); //Accendi pompa 1
else ReefAngel.Relay.Off(Port4);

if (ReefAngel.Timer[2].IsTriggered()) ReefAngel.Relay.On(Port5); //Accendi pompa 2
else ReefAngel.Relay.Off(Port5);

// accensione luce lunare
if ((NumMins(hour(),minute()) >= NumMins(23,28)) || (NumMins(hour(),minute()) <= NumMins(7,30))) ReefAngel.Relay.On(Port1);
else ReefAngel.Relay.Off(Port1);

// Specific functions
ReefAngel.StandardLights(Port2);
ReefAngel.StandardLights(Port3);
ReefAngel.StandardFan(Port6);
ReefAngel.StandardHeater(Port7);

RitardoSkimmer(Port8,120);
}

LukeLuke 06-04-2011 15:14

mmm.... ho aperto un post sul google groups... aspettiamo che rispondano...

Intanto puoi provare ad usare i timer personalizzati invece che quelli di sistema ?

sostituisci queste righe:

Sotto agli include scrivere:

ReefAngel_TimerClass MyTimer1;
ReefAngel_TimerClass MyTimer2;

setup(){
MyTimer1.SetInterval(21600);
MyTimer2.SetInterval(21600);
}

loop(){
if (ScheduleTime(6,0,0)) MyTimer1.Start(); // avvia timer1 alle 06:00:00
if (ScheduleTime(12,00,0)) MyTimer2.Start(); // avvia timer2 alle 12:00:00
if (ScheduleTime(18,00,0)) MyTimer1.Start(); // avvia timer1 alle 18:00:00
if (ScheduleTime(23,59,0)) MyTimer2.Start(); // avvia timer2 alle 24:00:00

if (MyTimer1.IsTriggered()) ReefAngel.Relay.On(pompa1); //Accendi pompa 1
else ReefAngel.Relay.Off(pompa1);

if (MyTimer2.IsTriggered()) ReefAngel.Relay.On(pompa2); //Accendi pompa 2
else ReefAngel.Relay.Off(pompa2);
}

Psyco 06-04-2011 15:20

il google group funziona bene...penso sia il valore aggiunto del reefangel...piano piano vedrete che sarete sempre più soddisfatti di questo "aggeggio"

rita87 06-04-2011 15:22

ma credo sia la stessa cosa, ad ogni modo provo!

rita87 06-04-2011 15:52

ps ho rimesso la temp in farenheit...
------------------------------------------------------------------------
Quote:

Originariamente inviata da Psyco (Messaggio 3550501)
il google group funziona bene...penso sia il valore aggiunto del reefangel...piano piano vedrete che sarete sempre più soddisfatti di questo "aggeggio"

sappi che fra poco verrai rotto per il wifi!!! :-D

Psyco 06-04-2011 15:56

non ci son problemi...è + semplice di quanto si pensi...unica cosa ostica è la mancanza di spiegazioni iniziali...

LukeLuke 06-04-2011 16:45

Mi hanno risposto di utilizzare la funzione per le dosometriche, perchè altrimenti con il metodo che ho postato prima io... si accende per una piccolissima frazione, dopo di che si rispenge subito....

Provate così:

void AlternaPompe(byte Pump, byte PTimer, byte OnHour, byte OnMinute, int RunTime)
{

// Let's see if it's supposed to start running the timer now
if ( (NumMins(hour(), minute()) == NumMins(OnHour, OnMinute)) && (second() == 0) )
{
Relay.On(Pump);
Timer[PTimer].SetInterval(RunTime);
Timer[PTimer].Start();
}

// is the timer expired?
if ( Timer[PTimer].IsTriggered() )
{
// timer expired, so let's shut off the pump
Relay.Off(Pump);
}
}


Loop()
{
AlternaPompe(Port3, 1, 6,0,21600);
AlternaPompe(Port4, 2, 12,0,21600);
AlternaPompe(Port3, 1, 18,0,21600);
AlternaPompe(Port4, 2, 0,0,21600);
}

Per chi ha gia le doso e serve anche l'alternanza deve fare le sostituzioni dei post precedenti creandosi dei timer ad HOC

lucaeff 06-04-2011 22:46

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*WEP#128
2*WPA1
3*Mixed*WPA1*&*WPA2-PSK
4*WPA2-PSK
5*Not*Used
6*Adhoc,*Join*any*Adhoc*network
*/
#define*WLAN_AUTH_MODE*1**//WEp#128 authentication mode

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

/*
WLAN_WEP_NUM
Wireless*WEP*Key*to*be*used*for*WEP#128*authentica tion*mode
*/
#define*WLAN_WEP_NUM*1**//WEP#128 key to be used - change if using WEP#128 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()
{
}


LukeLuke 06-04-2011 22:48

fai il metodo a mano usando Teraterm... la sistemi in 2 minuti....

lucaeff 06-04-2011 22:55

si ho provato ma niente quindi ho deciso di tentare con il pde ma mi dà errore nella compilazione

baghyyy 07-04-2011 00:22

io ho un problema ovvero modificando i menu mi carica tutto senza errore ma di fatto non modifica nulla:


/*
* Copyright 2010 Curt Binder
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef __REEFANGEL_FEATURES_H__
#define __REEFANGEL_FEATURES_H__

/*
This contains all the defines for enabling/disabling features with the controller software.

This file can be AutoGenerated by using the RAGenFeatures program.
*/

/*
If your sketch/compile size is getting too big or if you are running out of RAM and having bizarre events
happen with the controller, you may want to not display the graphics on screen which can save some memory.
Just comment out the next line to prevent any graphics from being displayed, you will have text only screens
during water changes and feeding modes.

Approximately 346 bytes to have this feature
*/
//#define DisplayImages // do we display the graphics for feeding or water change mode

/*
The next line is for displaying the setup screens to configure the values for the Feeding Mode timer and
the LCD shutoff timer. The defaults are fine, BUT if you would like to have the ability to change them
from the setup screen, uncomment the next line. This will increase the file size. If you do not plan
to change these values often (or at all), keep the next line commented out.

Approximately 362 bytes to have this feature
*/
//#define SetupExtras // feeding mode & screensaver timeout setup. ACTIVATE WITH CAUTION

/*
Since we may or may not need to always configure the Wavemakers, give the option to
turn off the setup screens to keep the compile size down. You can still use the Wavemakers,
you just will not have the setup screen available to configure the values. You will have to manually set
the intervals inside the Sketch (hardcode or have it read from memory if the memory contains the correct values).

Approximately 378 bytes to have WavemakerSetup
*/
#define WavemakerSetup

/*
These next two options are for the Dosing Pumps. They operate differently, so read carefully to determine
what option you want.

DosingPumpSetup
Allows for specifying a specific time in which you want the dosing pump to turn on and run for.
It only runs once per day and for the specified duration/run time.
This feature will allow you to configure the start time and run time from the setup screens.

DosingPumpIntervalSetup
Allows for specifying a minute interval that you would like the pump to turn on and run for.
It runs every minute interval for the entire day. It's start time is based off of midnight of the current day.
If you specified a 60 minute interval, it will run for the specified duration every hour.
This feature will allow you to configure the minute interval and run time from the setup screens.

Both options use the same Run Time that is stored in memory, so you will only be able to use one or the other
if you plan on configuring the run time from the setup screens. If you use the hard coded values, you won't
need to use these options and you can use separate run times.

You can still use the DosingPump and DosingPumpInterval functions without these options,
you will just need to have the memory already be set or specifically set the values in the PDE file.
You just will not be able to change the values from the controller's setup screen.

Approximately 2000 bytes to have DosingPumpSetup
Approximately 368 bytes to have DosingPumpIntervalSetup
*/
#define DosingPumpSetup
#define DosingPumpIntervalSetup


/*
Overheat Temperature is fairly constant. This value will most likely not get changed very often (if ever).
The default value is set to 150.0F. Once this value is reached, all the lights will get shutoff. If you
would like the ability to change this value from the menus, uncomment the next line. Otherwise you will have
to hardcode the value in the ShowInterface Function

Approximately 156 bytes to have this feature
*/
//#define OverheatSetup

/*
The ability to set the Date & Time on the controller is controlled by this next line. This line will add
in a Date / Time Setup menu entry which will allow you to set the date & time on the controller easily.
Comment the next line to remove this ability.

Approximately 1984 bytes to have this feature
*/
//#define DateTimeSetup

/*
If you do not want to have a Version menu entry to see what version of the software is on the controller,
then you will want to comment out the next line

Approximately 144 bytes to have this feature
*/
//#define VersionMenu

/*
If you do not use any of the ATO features in your setup, you can comment out this next line to remove
the ATO set and clear menu items.

Approximately 900 bytes to have this feature (and without SetupExtras)

When this or SetupExtras are defined, the Timeouts menu is included.
Timeouts menu requires approximately 710 bytes
This feature requires approximately 190 bytes if SetupExtras is defined
*/
#define ATOSetup

/*
This item will remove all lighting functionality from the controller. It is the equivalent to
commenting out MetalHalideSetup, StandardLightSetup, DisplayLEDPWM
This will OVERRIDE any of the other defines. So use caution when enabling this feature.

Approximately 2796 bytes to have this feature
*/
//#define RemoveAllLights

/*
If you do not use metal halides and do not wish to have any of the setup screens on your controller,
you can comment out the next line to remove the Metal Halide Setup and Metal Halide Delay

Approximately 258 bytes to have this feature
*/
#define MetalHalideSetup

/*
If you do not use standard lights and do not wish to have the setup screens on your controller,
you can comment out the next line to remove the Standard Lights Setup

Approximately 90 bytes to have this feature
*/
#define StandardLightSetup

/*
If you want to use the old way of reading the temp sensor which is always reading the value in
and not performing any sanity check, then you will want to uncomment this next line.

Otherwise, you will use the new way to handle the temperatures. The value is read in and then
compared to the existing value. If the difference between the 2 values is less than MAX_TEMP_SWING
or the temperature is 0 then the temperature is allowed to be updated, otherwise it is not updated.
MAX_TEMP_SWING is currently set to 50, which is 5.0 F. This prevents any temporary large fluctations
in temperatures. Also, there should not be more than a 5.0 F degree fluctation in 1 second.
*/
//#define DirectTempSensor

/*
Do we save the relay state before we enter Feeding Mode or Water Change Mode?

Comment out the next line to not save the state and always force specific ports to be turned off and then
back on again after we exit the mode. This can turn on some ports that were not already on. This
is also how the controller originally works.

Currently untested.
*/
//#define SaveRelayState

/*
If you have the wifi module for your controller and wish to use it, you must uncomment this next line
to utilize the built-in webserver for the controller.
*/
#define wifi

/*
This next line will control the displaying of all LED PWM related items. The items it controls are:

DP & AP displaying on main screen
LED PWM Setup screen

So, if you do not use LED PWM's at all and do not wish to display anything related to it, comment out
the next line and all that stuff will be removed.

Approximately 720 bytes to have this feature
*/
#define DisplayLEDPWM

/*
This next line will allow you to use the ATO switches independently from each other. You can specify
separate ports to control, separate timeouts and separate hourly intervals.
If you have this defined, you cannot use both switches together like originally intended.
The setup screens will show configurations for both switches.

Approximately 454 bytes to have this feature
*/
//#define SingleATOSetup

/*
If this next line is uncommented, you must include the following lines in
the PDE file at the top above all other include statements:
#include <ReefAngel_Colors.h>
#include <ReefAngel_CustomColors.h>
*/
//#define COLORS_PDE

/*
This will enable code for multiple expansion modules.

Approximately 530 bytes to have this feature
*/
//#define RelayExp

#endif // __REEFANGEL_FEATURES_H__


per fare un esempio io qui ho disattivato i disegni ed altro, ho salvato e poi ho fatto il download, ma di fatto appena finisce di caricare il menu non cambia ovvero li visualizzo ancora...e quello che ho attivato tipo le dosometriche non le visualizzo!
eppure non mi da nessun errore...

rita87 07-04-2011 00:41

Quote:

Originariamente inviata da lucaeff (Messaggio 3551559)
si ho provato ma niente quindi ho deciso di tentare con il pde ma mi dà errore nella compilazione

nemmeno a me va, nè tera term, nè pde.
Gli mando il comando e non mi risponde. Il cretino. -04

Psyco 07-04-2011 07:03

Fermiiii tutti!!!!...allora....FERMI!!!...facciamo il punto della situazione....siete tutti in possesso del modulo wifi??...ovviamente non riuscite a configurarlo...allora...partiamo da 0 tutti insieme...lasciate stare il codice wifi setup che tanto da un milione di errori...chi di voi ha già provato ad usarlo?

Baghyyy controlla meglio il settaggio delle librerie...se hai quel file features vuol dire che il programma non modifica la libreria...

per il wifi se volete posso aiutarvi passo passo su msn o skype..vi lascio i contatti:

msn: simomcdue@hotmail.com
skype: simomcdue

Psyco 07-04-2011 07:15

lucaeff prova a riscaricare le librerie con l'utility...le ritrasformi in standard e poi di nuovo in development...anche a me a volte è capitato di doverle rimetter perchè si buggavan...mistero..

LukeLuke 07-04-2011 08:10

secondo me come prima cosa dobbiamo sapere se tutti state utilizzando lo zip postato da me...


Tutti gli orari sono GMT +2. Attualmente sono le 15:47.

Powered by vBulletin versione 3.8.9
Copyright ©: 2000 - 2025, Jelsoft Enterprises Ltd.
Traduzione italiana Team: AcquaPortal
User Alert System provided by Advanced User Tagging v3.2.5 Patch Level 2 (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Copyright Zero Pixel Srl

Page generated in 0,13420 seconds with 13 queries