Commit 6bce3589 authored by Frank Radzio 's avatar Frank Radzio

Code Optimierung

parent 91763f14
#include <SoftwareSerial.h>
//Create software serial object to communicate with GPS
SoftwareSerial gps(8, 7);
void setup() {
//Begin serial comunication with Arduino and Arduino IDE (Serial Monitor)
Serial.begin(9600);
while(!Serial);
//Being serial communication witj Arduino and GPS Module //Important rate must be 9600
gps.begin(9600);
delay(1000);
Serial.println("Setup Complete!");
}
void loop() {
//Read SIM800 output (if available) and print it in Arduino IDE Serial Monitor
if(gps.available()){
Serial.write(gps.read());
}
//Read Arduino IDE Serial Monitor inputs (if available) and send them to SIM800
if(Serial.available()){
gps.write(Serial.read());
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment