iotacademy / marvin

Essentials for Marvin LoRa Development
GNU General Public License v3.0
27 stars 188 forks source link

Seeed GPS Grove Module v1.2 and Marvin #10

Open patmolloy opened 6 years ago

patmolloy commented 6 years ago

Hi,

I am trying to use this module on the 3rd Marvin Grove Port (Marked D12 and D4 on the bottom of the PCB) in conjunction with the SoftwareSerial library. Here is the start of the sketch. It does not work - SoftSerial.available() always return 0. I have tried swapping the 12,4 around just in case I had RX/TX swapped. In looking at the schematics I am wondering whether that Grove port is really Digital 12 and Digital 4 ?? (seems to suggest D1 and D2).

Assuming I can get the ports right, should this actually work? I cannot see why not!

If I need to use the broken out RX/TX pads on the PCB .. what is the code I need?

Thanks!!

Pat

#include <SoftwareSerial.h>
SoftwareSerial SoftSerial(12,4);            // RX, TX
unsigned char buffer[64];                   // buffer array for data receive over serial port
int count=0;                                // counter for buffer array
void setup()
{
    SoftSerial.begin(9600);                 // the SoftSerial baud rate
    Serial.begin(9600);                     // the Serial port of Arduino baud rate.

}

void loop()
{
    Serial.print("Hello --- ");
    Serial.println(SoftSerial.available());
    if (SoftSerial.available())                     // if data is coming from software serial port ==> data is coming from SoftSerial shield