🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    M5Stack together with Controllino - Serial transmission problems

    Core 2
    1
    1
    185
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      klaus.wagner
      last edited by

      I want to read data that are send serial from the Controllino Mini USB-B port to M5Stack. Serial transmission is available and can be seen if I connect a PC with the USB-A port. A COM-Port is generated and HTERM can log the data. On M5Stack with the USB-B to USB-C connection, no values are displayed. I successfully tried to transmit Data from the PC to M5Stack with an USB-A to USB-C cable.

      What is different with the USB-B to USB-C cable?
      Is the problem with the Controllino or the M5Stack or the cable?
      What is necessary that Controllino Mini sends the data and M5Stack can interprete this data?

      Thank you for your help?

      Here the code:

      '''
      #include <M5Stack.h>

      String receivedString = "";
      bool newData = false;

      void setup() {
      M5.begin();
      M5.Power.begin();

      Serial.begin(115200);

      M5.Lcd.setTextSize(2);
      M5.Lcd.setTextColor(WHITE, BLACK);
      M5.Lcd.println("Warte auf Daten...");
      }

      void loop() {
      while (Serial.available() > 0) {
      char incomingChar = Serial.read();
      if (incomingChar == '\n') {
      newData = true;
      } else {
      receivedString += incomingChar;
      }
      }

      if (newData) {
      M5.Lcd.fillScreen(BLACK);
      M5.Lcd.setCursor(0, 0);
      M5.Lcd.println("Empfangen:");
      M5.Lcd.println(receivedString);

      receivedString = "";
      newData = false;
      

      }

      M5.update();
      }
      '''

      1 Reply Last reply Reply Quote 0
      • First post
        Last post