Digispark GPS example sketch on ATtiny85 board--how to connect GPS module to Serial?

I want to run the GPS sketch that is provided by Digispark in their examples on a Digispark ATtiny85 board (Arduino IDE: File>Examples>Digispark Examples>GPS).

I don't know how to physically connect the GPS to Serial on this board.

The sketch reads the GPS data stream via Serial, parses it and sends the data as text to the PC via DigiKeyboard procedures and the USB cable. The text appears to be coming from the PC's keyboard and can be displayed in a programme such as Notepad.

I've run their Keyboard example on the ATtiny85 board and that works as it should.

The GPS sketch expects the GPS to be connected to the Serial. It uses Serial.read to get the GPS data:

#include "DigiKeyboard.h"

char nmeaString[57];
bool gpsReady = 0;
bool gpsDateTimeReady = 0;

void setup() {                                
  DigiKeyboard.delay(3000);//When this sketch is used with DigiKeyboard as it is here, it tends to need a bit of a delay at the start
  Serial.begin(9600); //Connect to GPS
  DigiKeyboard.delay(1000);//We need a delay before we init the GPS module
  initGPS(); //Send init msgs to GPS

I don't know how the GPS is meant to be physically connected to Serial. To a pin? To the cable? But that is plugged into the PC. Can't work it out. I don't really know where the Serial is located on the board. I've read everything about this board I can find from Digispark and Digistump and the Arduino forum.

Can anyone guide me? Thanks.


This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.