Hardware Serial
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- zzcrow
- Posts: 54
- Joined: Sun Jun 12, 2016 12:27 pm
Hardware Serial
I need to know how to create an object for hardware Serial on all boards please. Nodemcu, mega, grand central, feathers, etc. (This is for sensors that use rx and tx pins) Seems like how it is created has changed? The sensor expects an instantiated hardware serial object, which is passed to a function that configs the sensor . This is for a dfrobot gesture sensor. This migraine is not letting me think Lol
- zzcrow
- Posts: 54
- Joined: Sun Jun 12, 2016 12:27 pm
Re: Hardware Serial
Nevermind I figured it out :/ Answer: #include "HardwareSerial.h" Serial1 is first hardware serial, but on nodemcu I have to use Serial.swap() to use a sensor due to flash properties.
Depending on how many hardware Serials there are you keep going from Serial1 as first, Serial2, etc depending on how many there are. Doh!!!!
Depending on how many hardware Serials there are you keep going from Serial1 as first, Serial2, etc depending on how many there are. Doh!!!!
Please be positive and constructive with your questions and comments.