No SoftwareSerial on UNO Q?

For the the life of me I'm trying to figure out either why uno q doesn't have Software Serial built-in like the Minima or if there is another way to do it? Please if you have an example of how to do it please share. I'm trying to connect a HC-06 to the uno q and I don't think i can do it without the SoftwareSerial. Thank You in advanced!!!

Hi @printlabsbybrandon. There is a hardware serial interface on pins 0 and 1 on the UNO Q. This is referenced via the Serial object in your sketch code.

Note that this is a completely separate interface than the one you access via the Monitor object in your sketch code, which communicates via the serial port that connected to the Serial Monitor in App Lab, and also seen by the operating system of a separate computer connected to the UNO Q via a USB cable (PC hosted mode).

So you can simply connect he HC-06 to pins 0 (RX) and 1 (TX) on the UNO Q and then use the Serial object in the sketch code that communicates with the HC-06.

Give it a try. If you encounter any problems, you can come back here and share the following in a reply on the forum topic:

  • Your full sketch code.
  • A detailed description of the electrical connections between the UNO Q and the HC-06.
  • A detailed description of the problem you encountered.
void setup() {
  Serial.begin(9600); // Arduino serial monitor
  Serial.println("Bluetooth module ready");
}

void loop() {
  // Send data from Bluetooth to Serial Monitor
  if (Serial.available()) {
    char data = Serial.read();
    Serial.print("Received: ");
    Serial.println(data);
  }
  
  // Send data from Serial Monitor to Bluetooth

  if (Serial.available()) {
    char data = Serial.read();
    Serial.write(data);
    Serial.print("Sent: ");
    Serial.println(data);
  }
}

Here is what i have so far. So what happens is that when i go to connect my computer to the bluetooth name HC-06 it connects, the light stops blinking for like 5 seconds then continues to blink. then the computer says disconnected. What am i missing and nothing is showing up in the serial monitor when i use serial only when i change things to monitor will i see something. I'm still trying to learn the whole app labs and everything. I'm also new to Arduino so I'm trying to learn in the process.

You are missing this:

https://docs.arduino.cc/tutorials/uno-q/user-manual/#from-serial-to-monitor

This is a significant difference between the UNO Q and other Arduino boards:

The Serial object is only used to communicate via the hardware serial interface on pins 0 and 1.

The Serial object DOES NOT communicate over the serial port the UNO Q board produces on your computer when you connect it with a USB cable.

When you want to communicate via the serial port the UNO Q board produces on your computer when you connect it with a USB cable, you MUST use the Monitor object.

It is essential to take an iterative approach to Arduino projects. You made a mistake by jumping into trying to use the HC-06 before you had verified that you were able to accomplish basic communication with Serial Monitor. So, until you have accomplished that, disconnect the HC-06 from the UNO Q and put it aside. You need to focus all your attention on the fundamentals for now and the HC-06 will only be a distraction.

Now it is time for you to learn how to communicate with Serial Monitor. Create a sketch with the following simple demonstration code (you can use Arduino IDE or Arduino App Lab, with the default Python script code):

#include <Arduino_RouterBridge.h>

void setup() {
  Monitor.begin();
}

void loop() {
  Monitor.println("hello");
  delay(1000);
}

Do you see how the Monitor object is being used in the sketch code? Do you see that it is not using the Serial object?

Now upload the sketch to the UNO Q. After the sketch has been successfully uploaded, open Serial Monitor. Do you now see the expected "hello" message being printed at 0.5 Hz?

I join this issue, because it is pretty close to my problems, although I am using HC-12 (RF 433MHz).
An old Uno with Joystick Shield is sending a 4 to 5 digit code (2Byte integer).
Uno Q with HC-12 on D0 and D1 shall receive the code.

#include "Arduino_RouterBridge.h"
void setup() {
    Serial.begin(9600);
    Bridge.begin();
    Monitor.begin();
    delay(1000);
}
void loop() {
  // Receive data from HC-12
  if (Serial.available()) {
    int data = Serial.read();
    Monitor.print(data);
    }
  }

Yes, some numbers show up, but I cannot see my code, not even the correct pattern.

Are there more functions/methods for Serial to pick up the signal? I tried readline() which is obviously not available. And I tried types int and char.

Hi @legoexpert2011. Change this line:

to this:

    Monitor.write(data);

Monitor.print will print the decimal character code of the received data. Monitor.write will print the actual character.

Reference:

https://docs.arduino.cc/language-reference/en/functions/communication/serial/write/

Thanks for the support. However,
The Uno with joystick shield sends 5051 in neutral position.
The received data are confused, even with Serial.write().

This is a known bug:

The developers are working on a fix:

might be something up with newline \n.
using \r instead seems to clear it up??
strange.. ~q

Well no, the fix posted states they were “exploiting too much parallelism”. The suggestion is this results in data arriving out of order and they know how to fix it. We should expect it to be resolved in an upcoming update.

Yes, I read that, was going to add a comment over there..
There's something up with newline..
Note, I'm not saying that there is no serialization issues..
I'm saying something's up with newline \n, think it's crashing something somewhere or causing some bump in the works..
strange.. ~q