Untitled
Anonymous
c_cpp
11/18/2023 4:14 PM
676 B
16
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