Go Down

Topic: Strange encoding problem with Arduino Uno Wifi Rev2 (Read 269 times) previous topic - next topic

TheNetStriker

Jan 17, 2019, 08:31 pm Last Edit: Jan 18, 2019, 11:34 am by TheNetStriker
I've just received my Arduino Uno Wifi Rev2 and tried to update an existing project that works on the Arduino Uno. In the setup method I'm writing the text "Start" to the serial port. For some reason the serial monitor displays some random characters. So I started a new sketch with a very simple test program:

Code: [Select]

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }
  Serial.println("START");
}

void loop() {
  // put your main code here, to run repeatedly:

}


This sketch now sometimes outputs "?TART" and sometimes "*UIQ5." What is even stranger is that when I e.g. load the "CheckFirmwareVersion" example the serial output is fine. I can then also add text to the start of an existing string and it outputs fine. But If I replace an existing string completely with "START" I get the wrong output again.

I also found out that the digitalPinToInterrupt method does not work like on the Arduino Uno. When I pass the parameter 2 to this method it translates to 0 on the Arduino Uno and that works fine. But on the Wifi Rev this should translate to 2 in order to work.

I work on a Mac Pro with Arduino IDE version 1.8.8. Are these known problems and how can I solve them?

Edit: I also tested this on a Windows Pc with a fresh Arduino installation and I've got the same problem. I also updated the bootloader and the Wifi Firmware to the latest version. Does no one else have this problem?

TheNetStriker

#1
Jan 22, 2019, 10:04 am Last Edit: Jan 22, 2019, 06:19 pm by TheNetStriker
Does really nobody else have this problem? I've tried this on multiple computers, operating systems, two different Arduino's and also with the latest version of the Arduino IDE and had the problem every time.

DrDiettrich


TheNetStriker

What is
  while (!Serial)
supposed to do?
On some boards this is required because the usb serial port takes some time to initialize, so I tried if it helps. But the problem also occurs without those lines.

DrDiettrich

If nobody else does have that problem, your board or USB cable (power supply) seems to be broken.

TheNetStriker

#5
Jan 23, 2019, 07:33 pm Last Edit: Jan 24, 2019, 11:10 am by TheNetStriker
If nobody else does have that problem, your board or USB cable (power supply) seems to be broken.
I've already tested this on two wifi boards and with two different usb cables. I also have no problems with my Arduino UNO. And the problem only seams to occur in the setup method. Does the Arduino Wifi rev2 maybe sends something to the serial port at startup that messes with the output?

I also tried this serial monitor: https://itunes.apple.com/ch/app/serialtools/id611021963?mt=12
In this serial monitor I don't receive anything until I check the DTR checkbox. This is not required on the Arduino UNO. Is this a normal behaviour on the Wifi Rev2 or could this be a part of the problem?

Go Up