Hi there!
Long story short: I want to use hardware RX of atmega to recieve TX from Neo-6M GPS device.
Testing everything with softwareSerial example works:
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, -1); // RX, TX
void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
Serial.println("Goodnight moon!");
// set the data rate for the SoftwareSerial port
mySerial.begin(9600);
mySerial.println("Hello, world?");
}
void loop() { // run over and over
if (mySerial.available()) {
Serial.write(mySerial.read());
}
if (Serial.available()) {
mySerial.write(Serial.read());
}
}
but after swiching wire to RX and to this schetch:
char character;
void setup() {
Serial.begin(9600);
gpsSerial.begin(9600);
Serial.println("Hi!");
}
void loop() {
if (Serial.available()) { // If anything comes in Serial1 (pins 0 & 1)
character = Serial.read();
Serial.write(character); // read it and send it out Serial (USB)
}
}
it stops.
Neo is 3v3 device - might it be a problem?
Best regards!