Loading...
  Show Posts
Pages: [1] 2 3 ... 5
1  International / Español / Re: limitaciones de texto al escribir un archivo en una SD???? on: May 19, 2013, 05:31:03 pm
Perfecto entonces! Imagino que se borra al reiniciar...

Mañana probare la libreria freemem , para ver como ando de memoria libre, y modificar el scketch para que todos string se guarden en la flash....

Gracias otra vez!
2  International / Español / Re: limitaciones de texto al escribir un archivo en una SD???? on: May 19, 2013, 04:47:05 pm
FUNCIONAAAA!!!!!!!!!   smiley smiley smiley smiley smiley

usando F para guardar en la memoria flash

   myFile.print(F(" CAMBER DELANTERO.............................: "));

Era problema de memoria.. ahora... como vacio la memoria flash???? o no es necesario????

Muchas Gracias!!!!!!!!!!


Sois los mejores!!!!!!!
3  International / Español / Re: necesito algun consejo y/o ayuda on: May 19, 2013, 11:39:33 am
Buenas,
Yo tengo un proyecto propio, que esta lejos de lo que buscas, pero uso los componentes que comentas  , échale un vistazo , también soy novato pero poco a poco vamos avanzando...

Lisergio.wordpress.com...
Proyecto ricino... ( un cuenta vueltas personal para rc)
4  International / Español / Re: limitaciones de texto al escribir un archivo en una SD???? on: May 19, 2013, 08:25:25 am
he probado lo que me comentas, funciona bien, no hay problemas al escribir....

pero he probado lo siguiente....

he sustituido las lineas a partir de las que falla....
Solo cambiando las lineas de texto de información.... y dejando la de la variable a mostrar....

ESTO ES LO QUE QUIERO; PERO NO FUNCIONA (se bloquea el sketch )

   myFile.print(" CAMBER DELANTERO.............................: ");
   myFile.println(camber_del);
   delay (50);
   
   myFile.print(" CASTER DELANTERO.............................: ");
   myFile.println(caster_del);
   delay (50);

   myFile.print(" TOE DELANTERO................................: ");
   myFile.println(toe_del);
   delay (50);

   myFile.print(" AGUJERO PISTON AMORTIGUADORES DELANTEROS.....: ");
   myFile.println(suspension_del_piston);
   delay (50);
   
   myFile.print(" ACEITE AMORTIGUADORES DELANTEROS.............: ");
   myFile.println(suspension_del_aceite);
   delay (50);
 
   myFile.print(" MUELLES AMORTIGUADORES DELANTEROS............: ");
   myFile.println(t_muelles_del);   
   delay (50);

   myFile.print(" MOUSSE RUEDAS DELANTERAS.....................: ");
   myFile.println(t_mousse_del);
   delay (50);
 
   myFile.print(" MARCA RUEDAS DELANTERAS......................: ");
   myFile.println(t_marca_del);   
   delay (50);
   
   myFile.print(" CAMBER TRASERO...............................: ");
   myFile.println(camber_tras);
   delay (50);

   myFile.print(" TOE TRASERO..................................: ");
   myFile.println(toe_tras);
   delay (50);

   myFile.print(" AGUJERO PISTON AMORTIGUADORES TRASEROS.......: ");
   myFile.println(suspension_tras_piston);
   delay (50);
   
   //********************************************************************
   
 
   myFile.print(" ACEITE AMORTIGUADORES TRASEROS...............: ");
   myFile.println(suspension_tras_aceite);
   myFile.println("");
   delay (50);
 
   myFile.print(" MUELLES AMORTIGUADORES TRASEROS..............: ");
   myFile.println(t_muelles_tras);
   myFile.println("");
   delay (50);

   myFile.print(" MOUSSE RUEDAS TRASERAS.......................: ");
   myFile.println(t_mousse_tras);
   myFile.println("");
   delay (50);

   myFile.print(" MARCA RUEDAS TRASERAS........................: ");
   myFile.println(t_marca_tras);
   myFile.println("");
   delay (50);

   myFile.print(" PINON........................................: ");
   myFile.println(pinon);
   myFile.println("");
   delay (50);

   myFile.print(" CORONA.......................................: ");
   myFile.println(corona);
   myFile.println("");
   delay (50);

   myFile.print(" HEMBRAGUE....................................: ");
   myFile.println(t_hembrague);
   myFile.println("");
   delay (50);


ESTO ESTA MODIFICADO COPIANDO LAS LINEAS ANTERIORES .. ESTO SI FUNCIONA

   myFile.print(" CAMBER DELANTERO.............................: ");
   myFile.println(camber_del);
   delay (50);
   
   myFile.print(" CASTER DELANTERO.............................: ");
   myFile.println(caster_del);
   delay (50);

   myFile.print(" TOE DELANTERO................................: ");
   myFile.println(toe_del);
   delay (50);

   myFile.print(" AGUJERO PISTON AMORTIGUADORES DELANTEROS.....: ");
   myFile.println(suspension_del_piston);
   delay (50);
   
   myFile.print(" ACEITE AMORTIGUADORES DELANTEROS.............: ");
   myFile.println(suspension_del_aceite);
   delay (50);
 
   myFile.print(" MUELLES AMORTIGUADORES DELANTEROS............: ");
   myFile.println(t_muelles_del);   
   delay (50);

   myFile.print(" MOUSSE RUEDAS DELANTERAS.....................: ");
   myFile.println(t_mousse_del);
   delay (50);
 
   myFile.print(" MARCA RUEDAS DELANTERAS......................: ");
   myFile.println(t_marca_del);   
   delay (50);
   
   myFile.print(" CAMBER TRASERO...............................: ");
   myFile.println(camber_tras);
   delay (50);

   myFile.print(" TOE TRASERO..................................: ");
   myFile.println(toe_tras);
   delay (50);

   myFile.print(" AGUJERO PISTON AMORTIGUADORES TRASEROS.......: ");
   myFile.println(suspension_tras_piston);
   delay (50);
   
   //********************************************************************
   
 
   myFile.print(" CAMBER DELANTERO.............................:  ");
   myFile.println(suspension_tras_aceite);
   myFile.println("");
   delay (50);
 
   myFile.print(" CASTER DELANTERO.............................: ");
   myFile.println(t_muelles_tras);
   myFile.println("");
   delay (50);

   myFile.print(" TOE DELANTERO................................: ");
   myFile.println(t_mousse_tras);
   myFile.println("");
   delay (50);

   myFile.print(" AGUJERO PISTON AMORTIGUADORES DELANTEROS.....: ");
   myFile.println(t_marca_tras);
   myFile.println("");
   delay (50);

   myFile.print(" ACEITE AMORTIGUADORES DELANTEROS.............: ");
   myFile.println(pinon);
   myFile.println("");
   delay (50);

   myFile.print(" MUELLES AMORTIGUADORES DELANTEROS............: ");
   myFile.println(corona);
   myFile.println("");
   delay (50);

   myFile.print(" MOUSSE RUEDAS DELANTERAS.....................: ");
   myFile.println(t_hembrague);
   myFile.println("");
   delay (50); 


ESTA ULTIMA PRUEBA; CAMBIANDO MAYUSCULAS POR MINUSCULAS DE LA OPCION QUE ME INTERESA, CREA EL ARCHIVO, PERO ESTA VACIO; NO ESCRIBE NADA

   myFile.print(" CAMBER DELANTERO.............................: ");
   myFile.println(camber_del);
   delay (50);
   
   myFile.print(" CASTER DELANTERO.............................: ");
   myFile.println(caster_del);
   delay (50);

   myFile.print(" TOE DELANTERO................................: ");
   myFile.println(toe_del);
   delay (50);

   myFile.print(" AGUJERO PISTON AMORTIGUADORES DELANTEROS.....: ");
   myFile.println(suspension_del_piston);
   delay (50);
   
   myFile.print(" ACEITE AMORTIGUADORES DELANTEROS.............: ");
   myFile.println(suspension_del_aceite);
   delay (50);
 
   myFile.print(" MUELLES AMORTIGUADORES DELANTEROS............: ");
   myFile.println(t_muelles_del);   
   delay (50);

   myFile.print(" MOUSSE RUEDAS DELANTERAS.....................: ");
   myFile.println(t_mousse_del);
   delay (50);
 
   myFile.print(" MARCA RUEDAS DELANTERAS......................: ");
   myFile.println(t_marca_del);   
   delay (50);
   
   myFile.print(" CAMBER TRASERO...............................: ");
   myFile.println(camber_tras);
   delay (50);

   myFile.print(" TOE TRASERO..................................: ");
   myFile.println(toe_tras);
   delay (50);

   myFile.print(" AGUJERO PISTON AMORTIGUADORES TRASEROS.......: ");
   myFile.println(suspension_tras_piston);
   delay (50);
   
   
//***************************************************************************


   myFile.print(" Aceite Suspension Trasera....................: ");
   myFile.println(suspension_tras_aceite);
   delay (50);
   
   myFile.print(" Muelles Suspension Trasera...................: ");
   myFile.println(t_muelles_tras);
   delay (50);

   myFile.print(" Mousse Ruedas Traseras.......................: ");
   myFile.println(t_mousse_tras);
   delay (50);

   myFile.print(" Marca Ruedas Traseras .......................: ");
   myFile.println(t_marca_tras);
   delay (50);
   
   myFile.print(" Pinon........................................: ");
   myFile.println(pinon);
   delay (50);
 
   myFile.print(" Corona ......................................: ");
   myFile.println(corona);   
   delay (50);

   myFile.print(" Hembraque ...................................: ");
   myFile.println(t_hembrague);
   delay (50);
 


No entiendo nada  smiley-eek , Lo único que cambia, son unas lineas de texto, sin ningún carácter  especial.... Las lineas en las que escribo el valor de las variables, se escriben de forma correcta...
Llevo 5 dias con este problema, y estoy atascadísimo ... ya no se que probar! He probado a quitar , puntos, cambiar mayúsculas, quitar espacios....

5  International / Español / Re: Ayuda, quiero adquirir un producto Arduino UNO, on: May 18, 2013, 04:08:36 pm
No podrías a través de ebay? hay muchos vendedores fiables que te lo podrían vender
6  International / Español / limitaciones de texto al escribir un archivo en una SD???? SOLUCIONADO on: May 18, 2013, 01:13:21 pm
Buenas a todos....
Tengo un proyecto, en el que estoy trabajando (lisergio.wordpress.com , proyecto RiCino) y en una parte del proyecto escribo varios datos en una SD.. simplemente unas lineas de texto, con unos valores ...

He querido añadir mas datos al archivo y hay empieza el problema.... llega un momento que depende de las lineas a escribir se queda bloqueado el sketch, o simplemente crea el archivo pero esta vacío....

pongo las lineas de la parte de la escritura del archivo... esta marcado el punto a partir del que falla...

para mas INRI, si elimino esas lineas y duplico las anteriores  funciona bien, pero si en esas que he duplicado, cambio los textos, también falla


myFile = SD.open(nombrefichero, FILE_WRITE);
if (myFile)
  {
   myFile.println("******************** INICIO DEL ENTRENO ********************");
   myFile.println("");
   myFile.println("");
   myFile.print("Tiempo total del entreno: ");
   m=tiempo/60000;                    
   mu=m%10;                            
   md=(m-mu)/10;                      
   s=(tiempo/1000)-(m*60);            
   su=s%10;                          
   sd=(s-su)/10;                      
   l=tiempo-(s*1000)-(m*60000);        
   lu=l%10;                          
   ld=((l-lu)/10)%10;                  
   lc=(l-(ld*10)-lu)/100;      
   myFile.print(md);                      
   myFile.print(mu);              
   myFile.print(":");
   myFile.print(sd);
   myFile.print(su);
   myFile.print(":");
   myFile.print(lc);
   myFile.print(ld);
   myFile.println(lu);
   myFile.println("");
   myFile.print("Total de vueltas:         ");  
   myFile.println(numero_vueltas);
   myFile.println("");
   myFile.print("Vuelta rapida - Vuelta ");
   if (numero_vuelta_rapida==0)
    {
      numero_vuelta_rapida=1;
    }
   myFile.print(numero_vuelta_rapida);
   myFile.print(" en: ");
   m=vuelta_rapida/60000;                    
   mu=m%10;                            
   md=(m-mu)/10;                      
   s=(vuelta_rapida/1000)-(m*60);            
   su=s%10;                          
   sd=(s-su)/10;                      
   l=vuelta_rapida-(s*1000)-(m*60000);        
   lu=l%10;                          
   ld=((l-lu)/10)%10;                  
   lc=(l-(ld*10)-lu)/100;                                                    
   myFile.print(md);                      
   myFile.print(mu);              
   myFile.print(":");
   myFile.print(sd);
   myFile.print(su);
   myFile.print(":");
   myFile.print(lc);
   myFile.print(ld);
   myFile.println(lu);
   myFile.println("");
   myFile.println("RESUMEN DE VUELTAS:");
   myFile.println("");
   int posicion_array = 0;
  
   while (posicion_array<numero_vueltas)
    {
     myFile.print(posicion_array+1);
     myFile.print(" -- ");
     tiempo_vuelta=guarda_vueltas[posicion_array];
     m=tiempo_vuelta/60000;                    
     mu=m%10;                            
     md=(m-mu)/10;                      
     s=(tiempo_vuelta/1000)-(m*60);            
     su=s%10;                          
     sd=(s-su)/10;                      
     l=tiempo_vuelta-(s*1000)-(m*60000);        
     lu=l%10;                          
     ld=((l-lu)/10)%10;                  
     lc=(l-(ld*10)-lu)/100;                                                    
     myFile.print(md);                      
     myFile.print(mu);              
     myFile.print(":");
     myFile.print(sd);
     myFile.print(su);
     myFile.print(":");
     myFile.print(lc);
     myFile.print(ld);
     myFile.println(lu);
     posicion_array=posicion_array+1;
  }
   myFile.println("");
   myFile.println("********************* FIN DEL ENTRENO **********************");
   myFile.println("");
   myFile.println("");

// A PARTIR DE AQUI ........ DATOS NUEVOS

   myFile.println("");
   myFile.println("");
   myFile.println("************************ DATASHEET *************************");
   myFile.println("");
   myFile.println("");
   myFile.println("");

   myFile.print(" CAMBER DELANTERO.............................: ");
   myFile.println(camber_del);

  
   myFile.print(" CASTER DELANTERO.............................: ");
   myFile.println(caster_del);


   myFile.print(" TOE DELANTERO................................: ");
   myFile.println(toe_del);
 

   myFile.print(" AGUJERO PISTON AMORTIGUADORES DELANTEROS.....: ");
   myFile.println(suspension_del_piston);
 
  
   myFile.print(" ACEITE AMORTIGUADORES DELANTEROS.............: ");
   myFile.println(suspension_del_aceite);

 
   myFile.print(" MUELLES AMORTIGUADORES DELANTEROS............: ");
   myFile.println(t_muelles_del);  


   myFile.print(" MOUSSE RUEDAS DELANTERAS.....................: ");
   myFile.println(t_mousse_del);
 
 
   myFile.print(" MARCA RUEDAS DELANTERAS......................: ");
   myFile.println(t_marca_del);  

  
   myFile.print(" CAMBER TRASERO...............................: ");
   myFile.println(camber_tras);
 

   myFile.print(" TOE TRASERO..................................: ");
   myFile.println(toe_tras);


   myFile.print(" AGUJERO PISTON AMORTIGUADORES TRASEROS.......: ");
   myFile.println(suspension_tras_piston);

**********************************************************
  
// A PARTIR DE AQUI .... FALLA SI LO PONGO INCLUSO ELIMINANDO LAS LINEAS DE ESCRIBIR LOS VALORES DE LAS VARIABLES
// SI ESTA COMENTADO FUNCIONA BIEN
 
**********************************************************
    
   myFile.print(" ACEITE AMORTIGUADORES TRASEROS...............: ");
   myFile.println(suspension_tras_aceite);
   myFile.println("");
   delay (50);
 
   myFile.print(" MUELLES AMORTIGUADORES TRASEROS..............: ");
   myFile.println(t_muelles_tras);
   myFile.println("");
 

   myFile.print(" MOUSSE RUEDAS TRASERAS.......................: ");
   myFile.println(t_mousse_tras);
   myFile.println("");


   myFile.print(" MARCA RUEDAS TRASERAS........................: ");
   myFile.println(t_marca_tras);
   myFile.println("");


   myFile.print(" PINON........................................: ");
   myFile.println(pinon);
   myFile.println("");


   myFile.print(" CORONA.......................................: ");
   myFile.println(corona);
   myFile.println("");


   myFile.print(" HEMBRAGUE....................................: ");
   myFile.println(t_hembrague);
   myFile.println("");
 



   myFile.println("");
   myFile.close();  
  }


Me estoy chinando  ... ya  no se que hacer.. no le encuentro ninguna lógica ni razón....

alguna idea???
7  International / Español / Re: Comprobar HC-SR04 on: May 18, 2013, 12:54:40 pm
Perdón, tienes razón
8  International / Español / Re: Comprobar HC-SR04 on: May 18, 2013, 09:56:59 am
El detector estaba averiado, he probado otro y funciona sin problema..
Gracias a todos ...
9  International / Español / Re: enviar notificación push al iphone?? SOLUCIONADO on: April 23, 2013, 03:27:37 pm
Al final era mas fácil de lo que parecía... he buscado por la red (el gran oráculo google me ha ayudado)...

En primer lugar tenemos que descargar una app para iOS, llamada Prowl.. es un gestor de notificaciones para Mac y Pc pero tenemos una librería para arduino...
APP - https://itunes.apple.com/es/app/prowl-growl-client/id320876271?mt=8
Librería - https://github.com/colagrosso/avviso
Para conseguir el api Key (necesario para que te lleguen las notificaciones) - http://www.prowlapp.com (hay que registrarse)

he creado un ejemplo muy sencillo, con un pulsador.. te llegara una notificación cada vez que pulses el botón.. con el mensaje correspondiente ...

#include <SPI.h>
#include <Ethernet.h>
#include <HTTPClient.h>
#include <Avviso.h>

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

IPAddress ip(192,168,1,100);
IPAddress gateway(192,168,1,1);   
IPAddress subnet(255, 255, 255, 0);


int boton1=4;
int buttonstate1=0;

void setup()
{
Ethernet.begin(mac, ip);
Avviso.begin();
Avviso.setApiKey("********* AQUI VA TU APIKEY ************");
Avviso.setApplicationName("Ejemplo Push Arduino");
}

void loop()
{
buttonstate1=digitalRead(boton1);
if (buttonstate1==HIGH)
{
   Avviso.push("Has pulsado el boton","", 0);
   delay(250);
}
 
}
10  International / Español / enviar notificación push al iphone?? SOLUCIONADO on: April 19, 2013, 03:33:54 pm
Buenas...
Después de buscar por el foro, solo he visto una página en alemán (la cual no entiendo ni papa, ni con google) y he compilado el ejemplo pero no funciona...

Alguien conoce alguna manera de enviar una notificación push??

La idea, es la siguiente, ...

Estoy montando un autómata para una persiana motorizada, basado en arduino, con un reloj , para los horarios de subida y bajada, pero también se podrá abrir o cerrar desde el iphone usando la app NetIO.. y la idea es poner un sensor en la puerta de acceso, y que me envíe una notificación push al iphone cada vez que entre alguien...

el automata, con la programación y el control manual con NetIO esta casi funcionando... pero me falta la notificación...

Alguna idea??

gracias!!!!
11  International / Español / Re: Arduino Ethernet W500 vs ENC28J60 on: April 13, 2013, 11:06:53 am
en este enlace hay unos ejemplos y tutoriales que me han venido muy bien para manejar algo de la enc28j60, pero da demasiados quebraderos de cabeza,.. yo tambien me  voy a pasar al shield original...

http://www.lucadentella.it/en/category/enc28j60-arduino/

suerte
12  International / Español / Re: ENC28J60 ethernet + App NetIO (iPhone) [SOLUCIONADO A MEDIAS] on: April 10, 2013, 07:14:05 am
Casi lo tengo!!!!

he conseguido controlar 5 lees con 5 botones en el iphone.... para ello he conseguido leer las tramas que se envian desde el iphone y se guardan en el buffer ....

Alguien sabría decirme como enviar un string desde la placa arduino??? (claro esta con la libreria ethercard.h)...
En cuanto solucione esto, si es que funciona.. pongo el código que he usado... si no funciona al menos funcionara en un sentido....

un saludo...
13  International / Español / Re: Pulsador en antrada analogica. on: April 08, 2013, 03:29:11 pm
pues entonces, haz como dice Carlosft89 ...
14  International / Español / Re: Pulsador en antrada analogica. on: April 08, 2013, 01:58:00 pm
si tienes varios pulsadores, porque no usas una entrada analógica, con unos divisores de tensión y conectas varios pulsadores a la misma entrada? así te quedarían entradas/salidas digitales libres para otra cosa...
15  International / Español / Re: ENC28J60 ethernet + App NetIO (iPhone) on: April 06, 2013, 01:36:39 pm
Viendo todos los comentarios negativos de este adaptador de red... Acabo de comprar en ebay uno con chip w5100....
pero no me rindo, ....

lo haré funcionar con la app !!!

un saludo y recibiré la ayuda con los brazos abiertos...
Pages: [1] 2 3 ... 5