Ir al contenido principal

Entradas

Mostrando entradas de marzo, 2012

Tomtún: el gps en una lata de atún

Estoy contento, al final tantas horas de trabajo han dado su fruto. Aquí esta el resultado: código arduino: #include <SoftwareSerial.h> #include <LiquidCrystal.h> #include <TinyGPS.h> #include<stdlib.h> TinyGPS gps; // initialize the library with the numbers of the interface pins LiquidCrystal lcd(12, 11, 5, 4, 3, 2); SoftwareSerial nss(6, 7); int ledPin = 10; int bota = 9; int botb = 8;   float flat, flon; int year; byte month, day, hour, minutes, second, hundredths; unsigned long fix_age; char buf[12]; char buf2[12]; byte modo = 0; float fkmph = 0 ; byte velocidad= 50;   void setup() { // set up the LCD's number of columns and rows: lcd.begin(16, 2); // Print a message to the LCD. lcd.print("TOMTUN"); delay(5000); lcd.clear(); nss.begin (9600); lcd.print("BUSCANDO..."); pinMode(ledPin, OUTPUT); pinMode(bota, INPUT); pinMode(botb, INPUT); digitalWrite(ledPin, LOW); tone(13,3500,500); } void loop() { while (nss.available()) { if (gps.enco