PIGPIO Library Installation

Hello, I wanted to ask how to properly install the library into my xojo project. I am having trouble doing that, thus getting errors because my library doesnt seem to be installed correctly.

What exactly have you tried? What is the result?

Sorry for the late response, I tried this : GitHub - UBogun/Xojo-pigpio: A Xojo library for pigpio features in Raspberry Pi projects

Then I added it like this:
image
Just Drag and Dropped it in.

I still get the following errors:

I just checked the pigpio library and it says I can download a different version, I want to use Eugene’s version as I am currently using his book to make my DC motors work.
Thus, now I downloaded
https://github.com/eugenedakin/pigpio-GPIO
And when I drag and drop it. It comes out like this:

image
And still gives me the same errors

Seems to Debug Build here ok
Maybe you can upload a small test project showing the errors


These are the errors I am getting, like its not recognizing the library at all.
This is the code:
image
I am Trying to follow Eugene’s book to help with my DC motors

Hello Carla,

Lets try and see if the configuration is setup correctly. Please reboot the Raspberry Pi.
In a terminal on the Raspberry Pi please type the following command: sudo systemctl status pigpiod

The terminal should have a line that says active (running) in a green colour.

SystemCtl

WAIT, so this code should only be running on the pi? not on the IDE?

like the wiringpi ?

You compile the file on a Windows or Mac machine first. One option is then to copy the binary file and libraries to the Raspberry Pi, and then run the program on the Raspberry Pi.

Can I tested it through the debugger? Since the license is too expensive for me

The good news is that a Raspberry Pi license is free. Please create a new account so that you can compile a free Raspberry Pi project.

Free is nice :slight_smile:

3 Likes

Alright I now have the license, but I don’t think its building. I pressed build and it made this :
image
So I copied this to a USB and when i put it on the raspberry PI it comes out as " Linux ARM"

Not to mention that when i check the build application on my windows it is simply states that it is empty, is this normal?


image

I checked if my piggpio on my raspberry pi is working, and it is ! I didn’t have it enabled at first, but now it is enabled, and its active and running. Comes out just like your screenshot !

1 Like

Lets build a simple program to make sure that the configuration is correct. Its just a simple LED blinking example.

  1. Go to the unzipped folder in the book, and load Example05-02-API2.xojo_binary_project.
  2. Press build and a binary and folder with the name Example5-2 should be built.
  3. Copy the file and folder to the desktop of the raspberry pi
  4. open a terminal to the desktop of the raspberry pi and go to the desktop directory in the terminal
  5. In the terminal, type sudo chmod +x Example5-2 (this gives the binary permission to run)
  6. type sudo ./Example5-2 to run the program

Let me know if you have a window appear on the Raspberry Pi :slight_smile:

Well I did it with Example 05-03 and it opens the window…

1 Like

Is it fine that the command worked to give it permission, but to run it , it wasn’t working. So I just pressed on the executable file. That should still be fine right? I mean its working

Right now I want to make your example work with my motors instead. If I can make your example work, then I can built off that. However, in your DC motor example, you do not use any enable pins. I am using a driver and it needs enable pins how would that modification look?

There are a few ways to make enable pins, 1) which could be either a physical connection to an outer power source to a relay for power, or 2) a logical check in programming with one pin as an input and another pin as an output. Please place a resistor between the input and output to prevent burning out the input pin. Programming in Xojo would check for a signal from the input pin, and if there is a signal then a signal would be supplied to control the motor.

What type of DC motor is being used: 1) DC motor, or 2) DC motor with PWM, or 3) Stepper motor?

A DC motor with PMW, we are using the L298N driver.

I am trying to do something like this:
image
Because on python we have something like:
image

Except of course using the buttons, like in your format.