Untitled
unknown
c_cpp
2 years ago
506 B
8
Indexable
#include <Servo.h>
#include <SoftwareSerial.h>
#include <TinyGPS++.h>
Servo myservo;
TinyGPSPlus gps;
SoftwareSerial ss(4, 3);
void setup() {
// put your setup code here, to run once:
myservo.attach(9);
Serial.begin(9600);
ss.begin(9600);
delay(1000)
}
void loop() {
while (ss.available() > 0){
gps.encode(ss.read());
if (gps.location.isUpdated()){
Serial.println(gps.speed.kmph());
delay(1000);
}
}
//myservo.write(gps.speed.kmph());
}
Editor is loading...
Leave a Comment