Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. QtonPi
  4. <Solved> MCP3008 with Qt Creator
Forum Updated to NodeBB v4.3 + New Features

<Solved> MCP3008 with Qt Creator

Scheduled Pinned Locked Moved QtonPi
5 Posts 4 Posters 2.9k Views 2 Watching
  • 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
    cdbean04
    wrote on last edited by cdbean04
    #1

    Hi I am running Qt Creator on a raspberry pi 2. I am using wiringPi to gain access to the GPIO and it is working great, but I need to receive some analog input. I purchased a MCP3008 adc for the pi. My question is, how do I use the MCP3008 on Qt? Do you know and links to good articles or tutorials for it? I am having a hard time finding information for the MCP3008 with Qt. Thanks

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

      Hi,

      Since it's on SPI, currently you will have to talk to the device using platform specific code ([this|(https://www.kernel.org/doc/Documentation/spi/spidev might get you started)

      Hope it helps

      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
      • M Offline
        M Offline
        modjo756
        wrote on last edited by modjo756
        #3

        Why you dont' use the fonction give by wiringpi : spi !

        1 Reply Last reply
        1
        • Pablo J. RoginaP Offline
          Pablo J. RoginaP Offline
          Pablo J. Rogina
          wrote on last edited by
          #4

          Please don't forget you need to enable support for SPI in the kernel. If you installed Raspbian, it's very likely you can use raspi-config [1] for doing so.

          [1] https://www.raspberrypi.org/documentation/configuration/raspi-config.md

          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

          1 Reply Last reply
          1
          • C Offline
            C Offline
            cdbean04
            wrote on last edited by
            #5

            Using wiringPi made using figuring out SPI very easy and straight forward.

            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