GithubHelp home page GithubHelp logo

Comments (4)

dani9084 avatar dani9084 commented on June 30, 2024 1

Solved it. Apparently it wasn't getting a clear enough signal, even though the LED was blinking on the board. I put the module outside and I'm getting readings from the module. Thank you for the help and sorry for waisting your time.

from tinygpsplus.

TD-er avatar TD-er commented on June 30, 2024

Please use 3 backticks at begin and end of the code, each on a single line.
The single backtick is for inline code like this.

Also which pins do you use for Serial2?

from tinygpsplus.

dani9084 avatar dani9084 commented on June 30, 2024

I'm using pin 16 and 17.
According to the pinout its RX2 and TX2.

from tinygpsplus.

TD-er avatar TD-er commented on June 30, 2024

For ESP32 you better give the pins you use to the begin argument or call setPins before calling Serial2.begin()

Here the function signature for setPins

    // Negative Pin Number will keep it unmodified, thus this function can set individual pins
    // setPins() can be called after or before begin()
    // When pins are changed, it will detach the previous ones
    bool setPins(int8_t rxPin, int8_t txPin, int8_t ctsPin = -1, int8_t rtsPin = -1);

Here for begin

    // When pins are changed, it will detach the previous ones
    // if pin is negative, it won't be set/changed and will be kept as is
    // timeout_ms is used in baudrate detection (ESP32, ESP32S2 only)
    // invert will invert RX/TX polarity
    // rxfifo_full_thrhd if the UART Flow Control Threshold in the UART FIFO (max 127)
    void begin(unsigned long baud, uint32_t config=SERIAL_8N1, int8_t rxPin=-1, int8_t txPin=-1, bool invert=false, unsigned long timeout_ms = 20000UL, uint8_t rxfifo_full_thrhd = 112);

So you can pick either one you like best.

from tinygpsplus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.