Show Posts
Pages: [1] 2
1  Using Arduino / Programming Questions / Re: PIR + Ethernet Shield + Twitter on: September 13, 2013, 04:53:11 pm
error: request for member 'concat' in 'msg', which is of non-class type 'const char [27]'  "
 you can see my code in: https://github.com/AnakinSpain/Anakino_Aquarium
2  Using Arduino / Programming Questions / Re: PIR + Ethernet Shield + Twitter on: September 13, 2013, 03:23:26 pm
I dont know how to ide debugging window. I have OS X.
3  Using Arduino / Programming Questions / Re: PIR + Ethernet Shield + Twitter on: September 13, 2013, 01:34:07 pm
Bad news.

It give me back an error " error: request for member 'concat' in 'msg', which is of non-class type 'const char [27]'  "

I have this code:

Code:
void tweet(char *msg)
    {
    previous_Millis = millis();
    // if there's a successful connection:
      Serial.println("connecting tweeter...");
      if (twitter.post(msg)) {
                              int status = twitter.wait(&Serial);
                               if (status == 200) { Serial.println("OK.");}
                               else
                               { Serial.print("failed : code "); Serial.println(status); }
                             }
                             else
                             
          { Serial.println("connection tweeter failed.");}
         

             
         
  }
 
 

Quote
void check_alarmas()        // Imprime el texto de las alarmas
 
  {

    setFont(LARGE, 255, 255, 0, 0, 0, 0);   
    myGLCD.setColor(0, 0, 0);
    myGLCD.fillRect(210, 120, 390, 192);
   
  if (bitRead(alarma,0) == false) //SI EN ALARMA 0 TENEMOS 0  => SISTEMA OK
      {
          myGLCD.setColor(0, 255, 0);     
          myGLCD.print("SISTEMA", 250, 120);
          myGLCD.print("FUNCIONANDO", 210, 145);

        if (bitRead(msg_enviado,0) == false)
        {
          tweet( msg.concat(rtc.getTimeStr(FORMAT_LONG)) );
          bitWrite(msg_enviado,0,1); //Marcamos que el msg de sit ok se ha enviado
          bitWrite(msg_enviado,1,0); //y que ha sido el ultimo en enviarse
          bitWrite(msg_enviado,2,0); //asi lo dejamos preparado para enviar las alarmas
        }
       
      }
     
    else if  (bitRead(alarma,1) == true) //SI EN ALARMA 1 TENEMOS 1 => ALARMA DISIPADOR
      {
       myGLCD.setColor(255, 0, 0);
       myGLCD.print("ALARMA", 250, 120);
       myGLCD.print("TEMPERATURA", 210, 145);
       myGLCD.print("DISIPADOR", 220, 165);
       
        if (bitRead(msg_enviado,1) == false)
        {
         tweet( strcat("Temperatura del disipador alta a las: ",rtc.getTimeStr(FORMAT_LONG) ) );
         bitWrite(msg_enviado,1,1);//Decimos que hemos enviado el del disipador
         bitWrite(msg_enviado,0,0);// los demas a cero, porque no se han enviado
         bitWrite(msg_enviado,2,0);
        }
      }
     
    else if  (bitRead(alarma,2) == true) //SI EN ALARMA 2 TENEMOS 1 => ALARMA AGUA
      {
       myGLCD.setColor(255, 0, 0);
       myGLCD.print("ALARMA", 250, 120);
       myGLCD.print("TEMPERATURA", 210, 145);
       myGLCD.print("ACUARIO", 230, 165);
       
       if (bitRead(msg_enviado,2) == false)
       {
       tweet( strcat("Temperatura del agua fuera de parametros a las: ",rtc.getTimeStr(FORMAT_LONG) ) );
       bitWrite(msg_enviado,2,1);//Decimos que hemos enviado el del temp agua
       bitWrite(msg_enviado,1,0);// los demas a cero, porque no se han enviado
       bitWrite(msg_enviado,0,0);
       }       
      }
  }

Code:
Twitter twitter("XXXXXX"); // Your Token to Tweet (get it from http://arduino-tweet.appspot.com/)
const char msg[] = "@emilitwitt, Alarma a las:";

byte msg_enviado = 0x0;
4  Using Arduino / Programming Questions / Re: PIR + Ethernet Shield + Twitter on: September 11, 2013, 04:17:43 pm
ok
Tomorrow I will try it!   smiley-cool
5  Using Arduino / Programming Questions / Re: PIR + Ethernet Shield + Twitter on: September 11, 2013, 04:09:02 pm
But It´s not a text + variable like
"Alarma a las:" hora

6  Using Arduino / Programming Questions / Re: PIR + Ethernet Shield + Twitter on: September 11, 2013, 04:02:25 pm
now it sends and error.

Tomorrow I will connect with arduino and explain with more detail.
But, What I want is "tweet" a text plus hour, like:

"Sistema ok a las: 21:30:15"

"Sistema falla a las 22:30:12"



How I can send to tweet a text with an variable?
7  Using Arduino / Programming Questions / Re: PIR + Ethernet Shield + Twitter on: September 11, 2013, 03:56:57 pm
I have an rtc and now I have this code:

Code:
         tweet( strcat("Temperatura del disipador alta a las: ",rtc.getTimeStr(FORMAT_LONG) ) );
Code:
void tweet(char *msg)
    {
    previous_Millis = millis();
    // if there's a successful connection:
      Serial.println("connecting tweeter...");
      if (twitter.post(msg)) {
                              int status = twitter.wait(&Serial);
                               if (status == 200) { Serial.println("OK.");}
                               else
                               { Serial.print("failed : code "); Serial.println(status); }
                             }
                             else
                             
          { Serial.println("connection tweeter failed.");}
8  Using Arduino / Programming Questions / Re: PIR + Ethernet Shield + Twitter on: September 11, 2013, 02:12:10 pm
Code:
Error 403 - {"errors":[{"code":187,"message":"Status is a duplicate"}]}
failed : code 403

Tel you that Tweeter does'nt like when you send many time the same exact stuff. Maybe you should just add the time and date to the warning message and the problem will probably get settle.

I will like to know how I can add time to msg!!

9  Using Arduino / Programming Questions / Re: Sketch compile in MAC OSX but not in Windows (error JAvA) on: June 30, 2013, 12:57:28 am
The code is separated by tabs. you can choose the tab you want clicking in the right and you will see all.

The code works fine in MAC OSX but in windows not.
10  Using Arduino / Programming Questions / Re: Sketch compile in MAC OSX but not in Windows (error JAvA) on: June 29, 2013, 12:06:54 pm
If you run Ferduino_Anakin.ino you will see all the code.
11  Using Arduino / Programming Questions / Re: Sketch compile in MAC OSX but not in Windows (error JAvA) on: June 29, 2013, 10:02:28 am
This is my code
12  Using Arduino / Programming Questions / Re: Sketch compile in MAC OSX but not in Windows (error JAvA) on: June 26, 2013, 05:24:48 pm
Thanks for help me!

your answer Pauls are helpfull for me!!

But I get this error.


PD: I am out of my home and I can not try sketch in a windows PC
13  Using Arduino / Programming Questions / Re: Sketch compile in MAC OSX but not in Windows (error JAvA) on: June 23, 2013, 02:46:14 am
I dont know why you say that.

I have a PC and a MACbook.

Others sketchs works fine in two computers, but, my personal sktch just run in mac osx.
14  Using Arduino / Programming Questions / Sketch compile in MAC OSX but not in Windows (error JAvA) on: June 23, 2013, 02:21:05 am
Hello, I am doing a sketch but in my Macbook it compile and load fine in arduino, but in windows it gaves me an error of JAVA.

How I can solve that???

Java is updateb both SO.


Regards.
15  International / Proyectos / Re: Proyecto: NetIO + arduino MEGA + Ethernet Shield on: April 06, 2013, 06:27:07 am
He escaneado el monitor serial y me da estos datos:



Pages: [1] 2