Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. How SPI(Serial peripheral interface ) Works in QT on Raspberry Pi B3+
QtWS25 Last Chance

How SPI(Serial peripheral interface ) Works in QT on Raspberry Pi B3+

Scheduled Pinned Locked Moved Solved Installation and Deployment
qt5 raspberryspi
14 Posts 5 Posters 6.7k 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.
  • A Offline
    A Offline
    Andrex_Qt
    wrote on last edited by
    #1

    hello all,
    I am new to QT and looking to interface raspberry pi with other micro controller using QT , i installed QT open source in linux os, pls help me if anyone worked on such project.
    Thank you in advance.

    aha_1980A 1 Reply Last reply
    0
    • A Andrex_Qt

      hello all,
      I am new to QT and looking to interface raspberry pi with other micro controller using QT , i installed QT open source in linux os, pls help me if anyone worked on such project.
      Thank you in advance.

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

      Hi @Andrex_Qt

      I'm not aware of a full example, but https://raspberry-projects.com/pi/programming-in-c/spi/using-the-spi-interface should give you the idea.

      Qt has to stay free or it will die.

      A 1 Reply Last reply
      1
      • aha_1980A aha_1980

        Hi @Andrex_Qt

        I'm not aware of a full example, but https://raspberry-projects.com/pi/programming-in-c/spi/using-the-spi-interface should give you the idea.

        A Offline
        A Offline
        Andrex_Qt
        wrote on last edited by
        #3

        @aha_1980 thanks for your reply I already had visited that site and tried to incorporate that in my Qt code but it is failing. does someone have a proper working example of this SPI+RPi+Qt?.

        aha_1980A 1 Reply Last reply
        0
        • A Andrex_Qt

          @aha_1980 thanks for your reply I already had visited that site and tried to incorporate that in my Qt code but it is failing. does someone have a proper working example of this SPI+RPi+Qt?.

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

          @Andrex_Qt

          but it is failing.

          Can you be more specific about what you did and what is not working?

          Qt has to stay free or it will die.

          A 1 Reply Last reply
          0
          • aha_1980A aha_1980

            @Andrex_Qt

            but it is failing.

            Can you be more specific about what you did and what is not working?

            A Offline
            A Offline
            Andrex_Qt
            wrote on last edited by
            #5

            @aha_1980
            basically this is my first project in which i have to use RPi peripherals through Qt programming and I have no idea how to do this. there are very less number to no examples about this topic over the internet. what I did was i followed this YouTube video https://www.youtube.com/watch?v=5gmLO0B6xSo , and made small GUI with buttons. project gets build but GUI doesn't appears. if there is proper process please let me know and if their are more example projects related to this then are more welcomed. thank you for your time.

            jsulmJ 1 Reply Last reply
            0
            • A Andrex_Qt

              @aha_1980
              basically this is my first project in which i have to use RPi peripherals through Qt programming and I have no idea how to do this. there are very less number to no examples about this topic over the internet. what I did was i followed this YouTube video https://www.youtube.com/watch?v=5gmLO0B6xSo , and made small GUI with buttons. project gets build but GUI doesn't appears. if there is proper process please let me know and if their are more example projects related to this then are more welcomed. thank you for your time.

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Andrex_Qt said in How SPI(Serial peripheral interface ) Works in QT on Raspberry Pi B3+:

              but GUI doesn't appears

              What graphics environment do you use on your RPi (X11, Wayland, ...)? What OS (is it Raspbian?)? Do you get any errors if you try to start your app?

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              A 1 Reply Last reply
              0
              • jsulmJ jsulm

                @Andrex_Qt said in How SPI(Serial peripheral interface ) Works in QT on Raspberry Pi B3+:

                but GUI doesn't appears

                What graphics environment do you use on your RPi (X11, Wayland, ...)? What OS (is it Raspbian?)? Do you get any errors if you try to start your app?

                A Offline
                A Offline
                Andrex_Qt
                wrote on last edited by
                #7

                @jsulm
                I am using RPI 3 B+ board Raspbian lite OS, i don't know about the graphics environment and yes when i press Gui button whole application disappears with error message that process got killed.

                jsulmJ 1 Reply Last reply
                0
                • A Andrex_Qt

                  @jsulm
                  I am using RPI 3 B+ board Raspbian lite OS, i don't know about the graphics environment and yes when i press Gui button whole application disappears with error message that process got killed.

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @Andrex_Qt Can you post the error message?

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  A 1 Reply Last reply
                  0
                  • jsulmJ jsulm

                    @Andrex_Qt Can you post the error message?

                    A Offline
                    A Offline
                    Andrex_Qt
                    wrote on last edited by
                    #9

                    @jsulm ,
                    hello,
                    the error message is "the program has finished unexpecteadly finished..."
                    whenever i click on ui buttons.
                    apologies for late reply...

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      Hi,

                      Did you check that you have everything initialised properly ?

                      You should run your application through the debugger. You can then get the stack trace and get clues from it on when it failed.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      A 1 Reply Last reply
                      1
                      • SGaistS SGaist

                        Hi,

                        Did you check that you have everything initialised properly ?

                        You should run your application through the debugger. You can then get the stack trace and get clues from it on when it failed.

                        A Offline
                        A Offline
                        Andrex_Qt
                        wrote on last edited by Andrex_Qt
                        #11

                        @SGaist yes! now working fine there was problem in code itself.

                        Pablo J. RoginaP 1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          What was the issue ?

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply
                          0
                          • A Andrex_Qt

                            @SGaist yes! now working fine there was problem in code itself.

                            Pablo J. RoginaP Offline
                            Pablo J. RoginaP Offline
                            Pablo J. Rogina
                            wrote on last edited by
                            #13

                            @Andrex_Qt it would be great if you could described the issue more specifically and also provide a detail of what was the solution. In addition, please don't forget to mark your post as solved. Thanks.

                            Upvote the answer(s) that helped you solve the issue
                            Use "Topic Tools" button to mark your post as Solved
                            Add screenshots via postimage.org
                            Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                            A 1 Reply Last reply
                            0
                            • Pablo J. RoginaP Pablo J. Rogina

                              @Andrex_Qt it would be great if you could described the issue more specifically and also provide a detail of what was the solution. In addition, please don't forget to mark your post as solved. Thanks.

                              A Offline
                              A Offline
                              Andrex_Qt
                              wrote on last edited by
                              #14
                              1. Root permission to the program
                                2.Spi Begin function

                              After these modifications it started working. beginners mistake.

                              1 Reply Last reply
                              2

                              • Login

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