Uploading doesn't delete/overwrite the previous program/s, there's 2 or more program in my board's memory that's running right now ahah pls help
i'm trying to use GPS and software serial then this happen
Uploading doesn't delete/overwrite the previous program/s, there's 2 or more program in my board's memory that's running right now ahah pls help
i'm trying to use GPS and software serial then this happen
That's just impossible.
So what code did you upload and what is wrong according to you.
Tried this first for testing and it worked
/*
GPS Test
Codes by:
e-Gizmo Mechatronix Central
http://www.e-gizmo.com
*/
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3);
void setup()
{
Serial.begin(9600);
mySerial.begin(9600);
}
void loop() // run over and over
{
while(!(mySerial.available())){}
Serial.write(mySerial.read());
}
and tried what this could do
#include "SoftwareSerial.h"
#define txPin 3
#define rxPin 4
SoftwareSerial gps = SoftwareSerial(rxPin, txPin);
byte byteGPS = 0;
int i = 0;
int state = 0;
char dataGPG[100]="";
char *pch;
char *GGA[15];
int sat = 0;
void setup()
{
Serial.begin(9600);
Serial.flush();
pinMode(rxPin, INPUT);
pinMode(txPin, OUTPUT);
gps.begin(4800);
gps.flush();
pinMode(13, OUTPUT);
digitalWrite(13, LOW);
}
void loop()
{
gps.flush();
Serial.flush();
Serial.println("Waiting GPS data...");
memset(dataGPG, 0, sizeof(dataGPG));
byteGPS = 0;
byteGPS = gps.read();
delay(1000);
while(byteGPS != '
but after this, i can tell that nothing’s changing, and i also did upload a blank program and the first code is still there
and as i try to upload other programs, they’re all there, ahahahah in different BAUDS too cuz of the serial.begin)
{
byteGPS = gps.read();
}
i=1;
dataGPG[0] = ’
but after this, i can tell that nothing's changing, and i also did upload a blank program and the first code is still there :confused:
and as i try to upload other programs, they're all there, ahahahah in different BAUDS too cuz of the serial.begin;
while(byteGPS != '*' )
{
byteGPS = gps.read();
dataGPG[i]=byteGPS;
i++;
}
dataGPG[i]= '\0';
string();
}
void string()
{
i=0;
memset(GGA, 0, sizeof(GGA));
pch = strtok (dataGPG,",");
if (strcmp(pch,"$GPGGA")==0)
{
while (pch != NULL)
{
pch = strtok (NULL, ",");
GGA[i]=pch;
i++;
}
plot(GGA,"$GPGGA");
}
}
void plot(char **GGAPrint, char *trama)
{
state = atoi(GGAPrint[5]);
sat = atoi(GGAPrint[6]);
if(trama=="$GPGGA" && state==1)
{
digitalWrite(13, HIGH);
Serial.println("");
Serial.println("----------------------------------------------");
Serial.print("UTC Hour -> ");
Serial.println(GGAPrint[0]);
Serial.print("Latitude -> ");
Serial.print(GGAPrint[1]);
Serial.println(GGAPrint[2]);
Serial.print("Longitude -> ");
Serial.print(GGAPrint[3]);
Serial.println(GGAPrint[4]);
Serial.print("GPS quality: 0=null; 1=GPS fixed -> ");
Serial.println(GGAPrint[5]);
Serial.print("Number of satellites -> ");
Serial.println(sat);
Serial.print("Horizontal Dilution of Precision -> ");
Serial.println(GGAPrint[7]);
Serial.print("Antenna altitude -> ");
Serial.print(GGAPrint[8]);
Serial.println(GGAPrint[9]);
Serial.print("Geoid Separation -> ");
Serial.print(GGAPrint[10]);
Serial.println(GGAPrint[11]);
Serial.println("----------------------------------------------");
Serial.println("");
}
else
{
digitalWrite(13, LOW);
Serial.println("");
Serial.println("-----------------------------");
Serial.print("|--- Satellites Used -->");
Serial.print(sat);
Serial.println(" |");
Serial.println("|----Waiting location----|");
Serial.println("-----------------------------");
Serial.println("");
}
}
but after this, i can tell that nothing’s changing, and i also did upload a blank program and the first code is still there
and as i try to upload other programs, they’re all there, ahahahah in different BAUDS too cuz of the serial.begin
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,00*79
$GPRMC,000336.799,V,,,,,0.00,0.00,060180,,,N*43
$GPGGA,000337.799,,,,,0,0,,,M,,M,,*48
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,00*79
$GPRMC,000337.799,V,,,,,0.00,0.00,060180,,,N*42
$GPGGA,000338.799,,,,,0,0,,,M,,M,,*47
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,00*79
$GPRMC,000338.799,V,,,,,0.00,0.00,060180,,,N*4D
$GPGGA,000339.799,,,,,0,0,,,M,,M,,*46
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,00*79
$GPRMC,000339.799,V,,,,,0.00,0.00,060180,,,N*4C
$GPGGA,000340.799,,,,,0,0,,,M,,M,,*48
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,00*79
$GPRMC,000340.799,V,,,,,0.00,0.00,060180,,,N*42
$GPGGA,000341.799,,,,,0,0,,,M,,M,,*49
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,00*79
$GPRMC,000341.799,V,,,,,0.00,0.00,060180,,,N*43
$GPGGA,000342.799,,,,,0,0,,,M,,M,,*4A
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,00*79
$GPRMC,000342.799,V,,,,,0.00,0.00,060180,,,N*40
$GPGGA,000343.799,,,,,0,0,,,M,,M,,*4B
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,00*79
still has this on serial monitor even if i upload a blank code/program
looks like the other codes are now gone [not sure but i can't see their printed words (of other program codes) in other bauds] after my last upload of blank code but the sentences in my previous reply (on serial monitor) is still there
Does uploading blank tells you it succeeded? Can you enable verify after upload? What does it say then?
Expand the bottom area of the IDE and under File:Preferences turn on Verbose Outputs for Upload.
Then post what you see there, using code tags, the </> button above:
Binary sketch size: 2,374 bytes (of a 258,048 byte maximum)
Binary sketch size: 2,374 bytes (of a 258,048 byte maximum)
C:\Arduino\hardware/tools/avr/bin/avrdude -CC:\Arduino\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega2560 -cwiring -P\\.\COM3 -b115200 -D -Uflash:w:C:\Users\CROSSR~1.CRO\AppData\Local\Temp\build5295757462750884764.tmp\sketch_feb14a.cpp.hex:i
avrdude: Version 5.11, compiled on Sep 2 2011 at 19:38:36
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "C:\Arduino\hardware/tools/avr/etc/avrdude.conf"
Using Port : \\.\COM3
Using Programmer : wiring
Overriding Baud Rate : 115200
avrdude: wiring_open(): releasing DTR/RTS
avrdude: wiring_open(): asserting DTR/RTS
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude done. Thank you.
That’s an example of the errors when no board is attached.
i just woke up ahah,
i tried to detach rx and tx like what i do the other day, because if i dont,
this error comes up: "avrdude: stk500_getsync(): not in sync: resp=0x00"
same when i upload a blank code
and yes, it does show Done Uploading even yesterday
then now, did upload another program and it isn't there anymore right now,
so... i think it's done by magic somehow ahahah