Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Send data from Arduino to Pi over serial communication

Send data from Arduino to Pi over serial communication

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
6 Posts 6 Posters 1.9k Views
  • 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.
  • C Offline
    C Offline
    Calvin Richerd
    wrote on last edited by Calvin Richerd
    #1

    I recently purchased MPU6050 breakout board. I tried it with my Arduino Uno similar I have tried with my Raspberry pi 3.

    it gives this weird output with raspberry (without any motion / in stable condition)!!!

    InvenSense MPU-6050
    Rpi start 2018
    Output range : 68, error = 0
    control ratio : 0, error = 0
    
    MPU-6050
    Read accel, temp and gyro, error = 0
    accel x,y,z: 1944, 368, 15608
    temperature: 30.576 degrees Celsius
    gyro x,y,z : -34, -204, -247, 
    
    MPU-6050
    Read accel, temp and gyro, error = 0
    accel x,y,z: 1952, 364, 15304
    temperature: 30.435 degrees Celsius
    gyro x,y,z : -38, -216, -274, 
    
    MPU-6050
    Read accel, temp and gyro, error = 0
    accel x,y,z: 1864, 388, 15356
    temperature: 30.482 degrees Celsius
    gyro x,y,z : -34, -233, -278, 
    
    MPU-6050
    Read accel, temp and gyro, error = 0
    accel x,y,z: 1888, 324, 15260
    temperature: 30.576 degrees Celsius
    gyro x,y,z : -14, -220, -261,
    

    Similar I have tried with Arduino that is working fine.

    MPU-6050
    Read accel, temp and gyro, error = 0
    accel x,y,z: 1, 4, 1
    temperature: 30.4 degrees Celsius
    gyro x,y,z : -3, -15, -7, 
    
    MPU-6050
    Read accel, temp and gyro, error = 0
    accel x,y,z: 1, 4, 1
    temperature: 30.4 degrees Celsius
    gyro x,y,z : -3, -15, -7, 
    
    MPU-6050
    Read accel, temp and gyro, error = 0
    accel x,y,z: 1, 4, 1
    temperature: 30.5 degrees Celsius
    gyro x,y,z : -3, -15, -7,
    

    Now, I got a proper reading from Arduino.

    Here is the problem!!!!!!

    I don't know how to sent proper gyro data from Arduino (C or C++) to Raspberry(Qt C++) because I haven't yet tried to send data from Arduino to raspberry (USB Serial communication).

    E 1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by SGaist
      #2

      Hi and welcome to the forums.
      Do you mean by normal serial communication ?
      http://www.ladyada.net/learn/arduino/lesson4.html
      On Qt side you just use the QSerialPort Class
      http://doc.qt.io/qt-5/qtserialport-examples.html
      You can test with the Terminal sample . it makes it easy to configure and open port.

      Or am I completely missing what you ask about ?

      1 Reply Last reply
      2
      • C Calvin Richerd

        I recently purchased MPU6050 breakout board. I tried it with my Arduino Uno similar I have tried with my Raspberry pi 3.

        it gives this weird output with raspberry (without any motion / in stable condition)!!!

        InvenSense MPU-6050
        Rpi start 2018
        Output range : 68, error = 0
        control ratio : 0, error = 0
        
        MPU-6050
        Read accel, temp and gyro, error = 0
        accel x,y,z: 1944, 368, 15608
        temperature: 30.576 degrees Celsius
        gyro x,y,z : -34, -204, -247, 
        
        MPU-6050
        Read accel, temp and gyro, error = 0
        accel x,y,z: 1952, 364, 15304
        temperature: 30.435 degrees Celsius
        gyro x,y,z : -38, -216, -274, 
        
        MPU-6050
        Read accel, temp and gyro, error = 0
        accel x,y,z: 1864, 388, 15356
        temperature: 30.482 degrees Celsius
        gyro x,y,z : -34, -233, -278, 
        
        MPU-6050
        Read accel, temp and gyro, error = 0
        accel x,y,z: 1888, 324, 15260
        temperature: 30.576 degrees Celsius
        gyro x,y,z : -14, -220, -261,
        

        Similar I have tried with Arduino that is working fine.

        MPU-6050
        Read accel, temp and gyro, error = 0
        accel x,y,z: 1, 4, 1
        temperature: 30.4 degrees Celsius
        gyro x,y,z : -3, -15, -7, 
        
        MPU-6050
        Read accel, temp and gyro, error = 0
        accel x,y,z: 1, 4, 1
        temperature: 30.4 degrees Celsius
        gyro x,y,z : -3, -15, -7, 
        
        MPU-6050
        Read accel, temp and gyro, error = 0
        accel x,y,z: 1, 4, 1
        temperature: 30.5 degrees Celsius
        gyro x,y,z : -3, -15, -7,
        

        Now, I got a proper reading from Arduino.

        Here is the problem!!!!!!

        I don't know how to sent proper gyro data from Arduino (C or C++) to Raspberry(Qt C++) because I haven't yet tried to send data from Arduino to raspberry (USB Serial communication).

        E Offline
        E Offline
        ethanscott
        wrote on last edited by
        #3

        @Calvin-Richerd said in Send data from Arduino to Pi over serial communication:

        I recently purchased MPU6050 breakout board. I tried it with my Arduino Uno similar I have tried with my Raspberry pi 3.

        it gives this weird output with raspberry (without any motion / in stable condition)!!!

        InvenSense MPU-6050
        Rpi start 2018
        Output range : 68, error = 0
        control ratio : 0, error = 0
        
        MPU-6050
        Read accel, temp and gyro, error = 0
        accel x,y,z: 1944, 368, 15608
        temperature: 30.576 degrees Celsius
        gyro x,y,z : -34, -204, -247, 
        
        MPU-6050
        Read accel, temp and gyro, error = 0
        accel x,y,z: 1952, 364, 15304
        temperature: 30.435 degrees Celsius
        gyro x,y,z : -38, -216, -274, 
        
        MPU-6050
        Read accel, temp and gyro, error = 0
        accel x,y,z: 1864, 388, 15356
        temperature: 30.482 degrees Celsius
        gyro x,y,z : -34, -233, -278, 
        
        MPU-6050
        Read accel, temp and gyro, error = 0
        accel x,y,z: 1888, 324, 15260
        temperature: 30.576 degrees Celsius
        gyro x,y,z : -14, -220, -261,
        

        Similar I have tried with Arduino that is working fine.

        MPU-6050
        Read accel, temp and gyro, error = 0
        accel x,y,z: 1, 4, 1
        temperature: 30.4 degrees Celsius
        gyro x,y,z : -3, -15, -7, 
        
        MPU-6050
        Read accel, temp and gyro, error = 0
        accel x,y,z: 1, 4, 1
        temperature: 30.4 degrees Celsius
        gyro x,y,z : -3, -15, -7, 
        
        MPU-6050
        Read accel, temp and gyro, error = 0
        accel x,y,z: 1, 4, 1
        temperature: 30.5 degrees Celsius
        gyro x,y,z : -3, -15, -7,
        

        Now, I got a proper reading from Arduino.

        Here is the problem!!!!!!

        I don't know how to sent proper gyro data from Arduino (C or C++) to Raspberry(Qt C++) because I haven't yet tried to send data from Arduino programming to raspberry (USB Serial communication).

        Hey there.
        I know this thread is pretty old and hence my true purpose.
        Could you tell me how you solved this problem of sending data?
        I have been stuck at it for a few hours and I am not sure how to go around it.
        Thanks!

        aha_1980A 1 Reply Last reply
        0
        • E ethanscott

          @Calvin-Richerd said in Send data from Arduino to Pi over serial communication:

          I recently purchased MPU6050 breakout board. I tried it with my Arduino Uno similar I have tried with my Raspberry pi 3.

          it gives this weird output with raspberry (without any motion / in stable condition)!!!

          InvenSense MPU-6050
          Rpi start 2018
          Output range : 68, error = 0
          control ratio : 0, error = 0
          
          MPU-6050
          Read accel, temp and gyro, error = 0
          accel x,y,z: 1944, 368, 15608
          temperature: 30.576 degrees Celsius
          gyro x,y,z : -34, -204, -247, 
          
          MPU-6050
          Read accel, temp and gyro, error = 0
          accel x,y,z: 1952, 364, 15304
          temperature: 30.435 degrees Celsius
          gyro x,y,z : -38, -216, -274, 
          
          MPU-6050
          Read accel, temp and gyro, error = 0
          accel x,y,z: 1864, 388, 15356
          temperature: 30.482 degrees Celsius
          gyro x,y,z : -34, -233, -278, 
          
          MPU-6050
          Read accel, temp and gyro, error = 0
          accel x,y,z: 1888, 324, 15260
          temperature: 30.576 degrees Celsius
          gyro x,y,z : -14, -220, -261,
          

          Similar I have tried with Arduino that is working fine.

          MPU-6050
          Read accel, temp and gyro, error = 0
          accel x,y,z: 1, 4, 1
          temperature: 30.4 degrees Celsius
          gyro x,y,z : -3, -15, -7, 
          
          MPU-6050
          Read accel, temp and gyro, error = 0
          accel x,y,z: 1, 4, 1
          temperature: 30.4 degrees Celsius
          gyro x,y,z : -3, -15, -7, 
          
          MPU-6050
          Read accel, temp and gyro, error = 0
          accel x,y,z: 1, 4, 1
          temperature: 30.5 degrees Celsius
          gyro x,y,z : -3, -15, -7,
          

          Now, I got a proper reading from Arduino.

          Here is the problem!!!!!!

          I don't know how to sent proper gyro data from Arduino (C or C++) to Raspberry(Qt C++) because I haven't yet tried to send data from Arduino programming to raspberry (USB Serial communication).

          Hey there.
          I know this thread is pretty old and hence my true purpose.
          Could you tell me how you solved this problem of sending data?
          I have been stuck at it for a few hours and I am not sure how to go around it.
          Thanks!

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @ethanscott said in Send data from Arduino to Pi over serial communication:

          I have been stuck at it for a few hours and I am not sure how to go around it.

          So what's your actual problem? Sending from what? Qt side? Arduiono side?

          Qt has to stay free or it will die.

          1 Reply Last reply
          2
          • Cleiton BuenoC Offline
            Cleiton BuenoC Offline
            Cleiton Bueno
            wrote on last edited by
            #5

            I wrote some articles about it, this is in Portuguese, but the code part I believe is easy to understand.

            https://www.embarcados.com.br/comunicacao-serial-arduino-qt5-console/
            https://www.embarcados.com.br/comunicacao-serial-arduino-qt5-widgets-p1/
            https://www.embarcados.com.br/com-serial-arduino-qt5-widgets-application-p2/
            https://www.embarcados.com.br/qt5-para-comunicacao-serial-aplicacao/


            Cleiton Bueno

            Blog | Linkedin | B2Open

            1 Reply Last reply
            4
            • J Offline
              J Offline
              john2515
              Banned
              wrote on last edited by
              #6
              This post is deleted!
              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved