Skip to content

Problems reading data from serial #64

@josejuansanchez

Description

@josejuansanchez

I am developing an extension for mBlock in order to use a custom shield for the Arduino Nano but I have some issues reading data from serial port with mBlock.

I am using mBlock v3.4.6 and I believe that there is a problem related with the reading of values from the serial port.

I have performed a basic test in order to show the problem. In this test the Arduino Nano is writing the same value on the serial port and mBlock only is able to receive the data when the board is connected the first time. If I disconnect the board and then I connect it again, mBlock seems that does not receive the values properly.

Here are the steps that I have followed:

  1. This is the Arduino code uploaded to the board.
void setup() {
  Serial.begin(57600);
}

void loop() {
  Serial.print(15);
  delay(250);
}
  1. Connect with the board from mBlock.
  2. Once the board is connected the serial monitor start to display the values sent through the serial port.
  3. Disconnect the board from mBlock.
  4. Connect the board again.
  5. Once the board is connected the serial monitor does not display any values.

mblock-bug-reading-serial

Could you help me to understand what is happening?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions