Bonjour à tous, dans le cadre d'un projet en Arduino, je doit récupérer les informations de la longitude et latitude, mais j'aimerais dans un premier temps juste afficher toutes les informations de mon GPS (Grove GPS SIM 28).
Pour m'aider dans mes recherches je suis aller sur le site Grove - GPS | Seeed Studio Wiki , j'ai l'impression d'afficher les bonnes informations, mais qu'elles ne sont pas cohérentes...ou que j'ai besoin d'un logiciel extérieur à Arduino.
D'après le tuto, je me suis rapprocher de SIMCom GPS DEMO mais pas moyen de connecter mon port au logiciel.
Si qq un aurait déjà eu ce problème...
#include <SoftwareSerial.h>
SoftwareSerial SoftSerial(2, 3);
unsigned char buffer[64]; // buffer array for data receive over serial port
int count=0; // counter for buffer array
void setup()
{
SoftSerial.begin(9600); // the SoftSerial baud rate
Serial.begin(9600); // the Serial port of Arduino baud rate.
}
void loop()
{
if (SoftSerial.available()) // if date is coming from software serial port ==> data is coming from SoftSerial shield
{
while(SoftSerial.available()) // reading data into char array
{
buffer[count++]=SoftSerial.read(); // writing data into array
if(count == 64)break;
}
Serial.write(buffer,count); // if no data transmission ends, write buffer to hardware serial port
clearBufferArray(); // call clearBufferArray function to clear the stored data from the array
count = 0; // set counter of while loop to zero
}
if (Serial.available()) // if data is available on hardware serial port ==> data is coming from PC or notebook
SoftSerial.write(Serial.read()); // write it to the SoftSerial shield
}
void clearBufferArray() // function to clear buffer array
{
for (int i=0; i<count;i++)
{
buffer[i]=NULL;
} // clear all index of array with command NULL
}
Ca m'affiche ce problème, et j'ai bien remplie correctement les informations grâce à cette vidéo (uniquement sur Windows le logiciel SIMCom).
