Pages: 1 ... 6 7 [8] 9 10
 71 
 on: Today at 06:45:13 pm 
Started by setra - Last post by raschemmel
Quote
  Again pardon not creating my own code here, however I really need something quickly that can get this flying.   

Don't get your hopes up.  This isn't a program writing service. We're here to help people learn to use arduinos and learn software and hardware. We generally don't write programs to order. I think you might be expecting too much if that's what you had in mind.

 72 
 on: Today at 06:44:26 pm 
Started by carlosad1981 - Last post by carlosad1981
Se tiveres um Arduino, ligas ao USB e metes la o teu projecto.... sem o bootloader isso e impossivel.

Se tiveres um gravador externo o bootloader torna-se desnecessario... mas ainda assim usar o bootloader e extremamente mais comodo.

Então eu volto à minha pergunta original... Como eu gravo o bootloader num ATMEGA328P-AU?

Não tenho o gravador, tenho um Arduino Uno, um Arduino Mega, um Arduino Leonardo e alguns ATMEGA328P-AU (SMD 32 pins) virgens... Tenho como gravar o bootloader no SMD com essas "ferramentas" que tenho?


Grande abraço...

 73 
 on: Today at 06:44:20 pm 
Started by rabbit85 - Last post by Arrch
You can edit your post, you don't have to post a new reply if you need to fix something.

 74 
 on: Today at 06:43:38 pm 
Started by NZarduino - Last post by Arrch
I feel like I just answered this question:

http://forum.arduino.cc/index.php?topic=257861.msg1822683#msg1822683

 75 
 on: Today at 06:41:54 pm 
Started by rabbit85 - Last post by rabbit85
Hello guys!!
I'm kind of new in programming world. I have a small project and I try to read the request by arduino mega 2560  which  comes from other Arduino(uno). I can read my coming string but for comparing part it doesn't work right .would you please take a look at my code and inform, me where is my error .your help be appreciate.

sending part:
Code:
String inputString  = "" ;
void setup(){

Serial.begin(19200);
inputString.reserve(2000);

}
void loop (){
   Serial.println("ST1,BT");
   delay(10000);
   if(StringComplete){
   inputString = "";
   stringComplete = false;
   }
}
void serialEvent(){
   while(Serial.available(){
      char inchar = (char)Serial.read();
      inputString += inchar;
      if(inChar == '\n'){
         StringComplete = true;
      }
   }
}
   
receiving side:
Code:
#include<string.h>
#include<stdio.h>
boolean stringComplete = false;
String inString = "";

int j = 0;
int allow = 0;
int count_check = 0;
char checkCommand[20];
char check_ST1[]="0000";
char check_BT[2];
char check_GPS[3];
char check_SYNC[4];
char check_INFO[4];
char* s1;
char* s2;
char* s3;
char* s4;
char* s5;
char* s6;
char* string;
char* tofree;

void setup(){
  
  Serial.begin(115200);   //
  Serial2.begin(19200);  // wireless communication
  Serial.println("start checking requests");
  
}
void loop(){
  check_array();
}
void check_array(){
  
  string = strdup("/^ST1,*BT:GPS%SYNC~INFO;");
   if (string != NULL) {
      tofree = string;
      s1 = strsep(&string, "^");
      s2 = strsep(&string, "*");   //ST1,
      s3 = strsep(&string, ":");   //BT
      s4 = strsep(&string, "%");   //GPS
      s5 = strsep(&string, "~");   //SYNC
      s6 = strsep(&string, ";");   //INFO
      free(tofree);
 
   }
  
   while(Serial2.available()){
      char check = (char)Serial2.read();
      inString += check;
      checkCommand[count_check] = check ;
      count_check++;
      if(check =='\n'){
         stringComplete = true;
      }
 
      if(stringComplete){
        
      for (int j = 0; j < sizeof(check_ST1); j++){
         check_ST1[j] = checkCommand[j];
        
         if(strcmp(check_ST1,s2)==0){                //check for ST1, request
            allow = 1;
            Serial.println("passed St check");
         }
      }
      for (int j=0; j < sizeof(check_BT); j++){       // check for BT request
         check_BT[j] = checkCommand[j+4];
      }
         if(strcmp(check_BT,s3)==0 && allow == 1){    
            allow = 0;
            Serial.println("passed BT check");
         }
      
         Serial.println(inString);
         inString= "";
         stringComplete = false;
         count_check = 0;
      }
   }  
}


my result :
Code:
start checking requests
passed St check
ST1,BT

ST1,BT

ST1,BT

ST1,BT

ST1,BT

what I expect that gives me :
Code:
passed St check
passed BT check
passed St check
passed BT check
your help be appreciate smiley

 76 
 on: Today at 06:40:36 pm 
Started by sonnystikz - Last post by raschemmel
I'll reserve comment until I see a schematic of a portion of it. Try drawing it by hand and posting a photo of it.

 77 
 on: Today at 06:40:16 pm 
Started by rabbit85 - Last post by rabbit85
Hello guys!!
I'm kind of new in programming world. I have a small project and I try to read the request by arduino mega 2560  which  comes from other Arduino(uno). I can read my coming string but for comparing part it doesn't work right .would you please take a look at my code and inform, me where is my error .your help be appreciate.

sending part:
Code:
String inputString  = "" ;
void setup(){

Serial.begin(19200);
inputString.reserve(2000);

}
void loop (){
   Serial.println("ST1,BT");
   delay(10000);
   if(StringComplete){
   inputString = "";
   stringComplete = false;
   }
}
void serialEvent(){
   while(Serial.available(){
      char inchar = (char)Serial.read();
      inputString += inchar;
      if(inChar == '\n'){
         StringComplete = true;
      }
   }
}
Code:
   
receiving side:
Code:

#include<string.h>
#include<stdio.h>
boolean stringComplete = false;
String inString = "";

int j = 0;
int allow = 0;
int count_check = 0;
char checkCommand[20];
char check_ST1[]="0000";
char check_BT[2];
char check_GPS[3];
char check_SYNC[4];
char check_INFO[4];
char* s1;
char* s2;
char* s3;
char* s4;
char* s5;
char* s6;
char* string;
char* tofree;

void setup(){
  
  Serial.begin(115200);   //
  Serial2.begin(19200);  // wireless communication
  Serial.println("start checking requests");
  
}
void loop(){
  check_array();
}
void check_array(){
  
  string = strdup("/^ST1,*BT:GPS%SYNC~INFO;");
   if (string != NULL) {
      tofree = string;
      s1 = strsep(&string, "^");
      s2 = strsep(&string, "*");   //ST1,
      s3 = strsep(&string, ":");   //BT
      s4 = strsep(&string, "%");   //GPS
      s5 = strsep(&string, "~");   //SYNC
      s6 = strsep(&string, ";");   //INFO
      free(tofree);
 
   }
  
   while(Serial2.available()){
      char check = (char)Serial2.read();
      inString += check;
      checkCommand[count_check] = check ;
      count_check++;
      if(check =='\n'){
         stringComplete = true;
      }
 
      if(stringComplete){
        
      for (int j = 0; j < sizeof(check_ST1); j++){
         check_ST1[j] = checkCommand[j];
        
         if(strcmp(check_ST1,s2)==0){                //check for ST1, request
            allow = 1;
            Serial.println("passed St check");
         }
      }
      for (int j=0; j < sizeof(check_BT); j++){       // check for BT request
         check_BT[j] = checkCommand[j+4];
      }
         if(strcmp(check_BT,s3)==0 && allow == 1){    
            allow = 0;
            Serial.println("passed BT check");
         }
      
         Serial.println(inString);
         inString= "";
         stringComplete = false;
         count_check = 0;
      }
   }  
}

Code:

my result :
Code:
start checking requests
passed St check
ST1,BT

ST1,BT

ST1,BT

ST1,BT

ST1,BT

Code:
which I expect that gives me :
Code:
passed St check
passed BT check
passed St check
passed BT check
Code:
your help be appreciate smiley

 78 
 on: Today at 06:40:02 pm 
Started by oinduino - Last post by oinduino
Thank you very much for your response walterr,
I am pretty sure that the integrity of the 'lock' is not the problem with 9 or 10 satellites along with the correct time being displayed.
Accuracy also appears to be very good, given the expected lag such systems inherently exhibit.
The LCD hardware also appears to be OK as the same hardware works faultlessly when programmed with Tom Kuehn's SailLogV1 sketch referred to at top of my sketch, but not many sailing vessels attain 100km/h. smiley-lol
It may be that where I have altered the code to display km/h (instead of knots) has been incorrectly implemented?
Can anyone suggest a debugging routine that would allow bench simulation of an over 100km/h condition, as opposed to driving out of town to attain a 100+km/h condition to test my code alterations?
I would like to explore further your suggestion with regard to 'hard coding' the hundreds digit but will require further coaching as this beyond my capability.
I feel that this area of the sketch is the cause of my problem, the corruption to the tens digit cannot be construed as rapidly changing and immediately recovers from this condition as I decelerate to 99km/h and below. The display of speeds up to 99 is very smooth and legible.
It could also be that the 'if' statement that keeps the hundreds digit blank until one hundred km/h is attained is the problem? 
Is there any possibility that such a condition might be caused by a crash of SRAM when being called upon to display three big fonts simultaneously?
I dunno, clutching at straws, so near and yet so far!
Anyway, thank you once again for your suggestions, walterr.
Further comment is very welcome.

 79 
 on: Today at 06:36:25 pm 
Started by NZarduino - Last post by NZarduino
Has anyone done this before??? is it as simple as a few changes??? or a whole new approach needed??

 80 
 on: Today at 06:34:32 pm 
Started by elyokko - Last post by elyokko
Que tal este es mi primer post tengo horas buscando infomacion y no encuentro nada parecido a mi problema . lo redacto a continuacion :

tengo un arduino MEGA 2560 y un Ethernet Shield para Arduino W5100,  estoy tratando de hacer el servidor o cualquier ejemplo tengo conocimientos basicos sobre redes ., el problema es que mi modem no me detecta el dispositivo como si no conectara nada heee hay lo que me preocupa pues no me da ni IP  ni nada es como si no conectara nada .  

mi modem es un Thomson TG585 v8






he tratado de encontrar la opcion de agregar dispositivo manualmente pero no lo hay solo funciona por DHCP

a alguien le ha pasado algo asi o tendre que pedir garantia por el producto ..

el producto si enciende y enciende los focos



y esto es lo que pasa si conecto el Ethernet Shield para Arduino W5100 el cable RJ45 directamente a mi computador esta es la ip que me da .



a hora quiero preguntar con que router va mejor alguna recomendacion de router ???? o que hago lo mando a garantia ?

alguna ayuda de ante mano gracias por el espacio.

Pages: 1 ... 6 7 [8] 9 10