Importing Raspberry Libraries

Sysprogs forums Forums VisualGDB Importing Raspberry Libraries

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #8881
    BenX
    Participant

    Hello,

    I just started working with VisualGDB and my Raspberry Pi v3.  I was trying to import the popular RPi.GPIO Library to my project so IntelliSense will work with it. The program (just a simple Python Program to switch LEDs on and off) works fine, but the RPi.GPIO Syntax is not recognized by Visual Studio. Is there a way to import this library to my project so it is recognized by IntelliSense?

    #8883
    support
    Keymaster

    Hi,

    Yes, it is possible to configure IntelliSense to show the imported code, however could you first clarify if you mean Python IntelliSense or C++ IntelliSense?

    #8885
    BenX
    Participant

    Thanks for your answer! Sounds great 🙂

    I will use Python for my project 🙂

    The RPi.GPIO is already installed on my raspberry…to import it into my VS I tried the MAKEFILE Settings in VisualGDB and here the “Include directories” function. But after typing “import RPi.GPIO as GPIO” in my project Visual Studio still doesnt know what im talking about 🙂

    • This reply was modified 7 years, 7 months ago by BenX.
    • This reply was modified 7 years, 7 months ago by BenX.
    #8900
    support
    Keymaster

    Hi,

    VisualGDB does not automatically configure the Python IntelliSense to match your Raspberry Pi. However you can configure it fairly easily:

    1. Open Tools->Python Tools->Python Environments
    2. Find the default environment there
    3. Create a copy of your Python directory used by the default environment and copy the packages from Raspberry Pi to that copy so that they don’t interfere with your regular Python installation
    4. Edit the Python environment settings in VS to use the new Python directory

    This should get IntelliSense to display the libraries copied from Raspberry Pi.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.