Open Xojo app on Raspberry Pi 3b

Hey,
I’m very new to Xojo and am using it to create a GUI for my raspberry pi which will also use the I/O pins of the pi. I designed my application on windows, and as per the tutorials I built the app for linux arm 32 bit and transferred it to my RPi. But when I open the application on RPi nothing happens. I saw a similar thread on the forum which said zipping the folder or converting it to binary will help but I’ve tried that too and nothing works. I also checked the libun… library on my pi and it already exists. I don’t know what to do now kindly help me out. Also, if I need to install anything other than the above library let me know since I’m very new to the pi and xojo both and have no previous experience. Thanks

Did you mark the application as executable? Check owner and group rights?

Launch the application from the terminal and see what errors you might get?

Maybe this article can help Rasp PI check file for executable

2 Likes

and if you replace the exe the executable flag is lost and need set again via context menu …

1 Like

Hi Amna,

I’ve made a program for a Raspberry Pi 4 Desktop. It is basically testing vibration on high speed spindles and how long they take to stop.
I use Remote Debugging with my design on a Windows PC. It works very well and highly recommended.
I’m making use of GPIO, I2C and SPI to get the data into my Raspberry Pi 4.
I’m attaching a couple of images showing the ‘Remote Debugging Connection’ and my program.


5 Likes

Thanks you so much!! It worked! Thanks a million times :slightly_smiling_face:

Hey Steve,
Thank you very much. I was facing problems with the remote debugger too and your answer helped me loads. And since you’re using GPIO can you help me out with it? :frowning:
I want to control relays and sensors with my GPIO. I saw the GPIO library on github and downloaded it and I also saw the tutorials by Xojo and einhugur, but they’re pretty confusing to me. What I understood was that I need to unzip the downloaded folder from github, and then add the library related to my usage to my application??
If this is correct then I don’t understand where I should add the library. For example if I wish to turn LED’s on and off whenever I press a button, then what should I do?
If possible can you just explain this basic LED on and off scenario and I’ll understand the rest.
Thanks :smiley:

https://docs.xojo.com/Category:Raspberry_Pi

Hi Amna,

I used wiringPi on that project which has unfortunately been deprecated. So you and myself should probably use something else going forward e.g. pigpio: -

pigpio

I have not used this yet but wiringPi still works.
Here is the link to the Xojo wiringPi page: -

Xojo wiringPi

Here is the Xojo GPIO Github page for downloading the code. You can also copy the GPIO bit you need out of a project: -

Xojo wiringPi GPIO

I do not know if you have selected any device to drive your relays but I use a TLP225A(F) photo relay. It is a 60V 500mA opto isolated mosfet driver. I like to keep my external circuitry isolated from the Pi.
Unfortunately I am at home this weekend and all my code is at work. I can take a screenshot of how the GPIO code is inserted in my code and show you how I output my signals.
When reading a GPIO pin you need to check if the pin has a pullup or pulldown set in the Pi. You can change these but wiringPi has a bug in the pullUp & pullDown part. You need to add a command in the config.txt file which is located in the Boot folder. Check this link for how to do this: -

Setting pullUp/pullDown values in config.txt

I’ll post the screen shot of how the Xojo wiringPi code is inserted in my Desktop program on Monday when I’m back at work.
Best wishes

1 Like

Thank you very much. I’m trying this out right now but would really appreciate it if you would upload the screenshots whenever you go to office and are free. Thanks again.

Hey,
I’ve looked at all these examples and I’m still confused…sorry :confused:
The problem is that I have written codes on arduino and those written on Xojo for GPIO seem similar but I’m confused about the GPIO library on github. Is is necessary to add the module from github for running a code or can I just make up the code like we do in arduino? I’ll be very grateful if you could somehow explain this to me…and bear with me because I’m a complete noob :frowning:

i used that part from xojo docu last year.
(i believe this wiringPi GPIO library is not supported anymore)
there was a xojo source code that you put into your app project.

alternate it is also possible to access gpio via tcp-network which offer more solutions.

So if wiringPi is not supported anymore, what should I use?
Lets suppose I need to build a simple application which turns and LED on or off when a button(in the application) is pressed.
So ho will I make that possible?

Hello Amna,

One option is to use pigpio, as it is fully functioning with all GPIO pins, I2C, SPI, and more. The library is free for Xojo and can be downloaded at: eugenedakin (Eugene Dakin) · GitHub

Self disclosure: I am the author of a book to program the Raspberry Pi GPIO. Here are instructions on installing the pigpio library and run Example 5-2, which is an LED example using Raspberry Pi’s GPIO pins.

The book is over 650 pages, has over 70 example programs with code and electrical layouts and can be purchased at: http://xojolibrary.com/, and more information is available here: Program Raspberry Pi 4B Electronics with Xojo - Buster Edition

3 Likes

Wow, @Steven_Hughes that is a really nice-looking control panel! I need to up my game :pensive:

1 Like

Hi Julia,

Thanks for your kind comment.
It was my first go with XoJo. There is nothing like going in at the deep end but it all works.
It shows how useful XoJo can be.

3 Likes

Hi Amna,

I’ll attach a screen shot of how wiringPi looks like when inserted into my program but I would reccomend that you look at Eugene Dakin and pigpio as he recommends. I will be looking at that as well.
You would have thought that I would have remembered Eugene as I purchased one of his books, ‘I Wish I Knew Hot To Program RaspberryPi 4B’, and the pigpio is looked at in the latest update.

Anyway, here is the screenshot: -

To change a GPIO pin level then use one of the following lines. Change the GPIO pin to the one you want: -

GPIO.DigitalWrite(23,GPIO.LOW)
GPIO.DigitalWrite(23,GPIO.HIGH)

Use GPIO.PinMode(23,GPIO.OUTPUT) once, before any of the above instructions to set the GPIO pin to Output.

1 Like

Thanks a lot for this. I’m still facing a lot of problems I wish I could just go back to python and do everything its just so much easier. But I can’t since a need a good looking GUI and Xojo has them. Anyway, I downloaded the library from github as added it to my application (that’s what I figured I was supposed to do). Then I used gpioWrite to and gpioSetMode. I don’t know if this is correct or not but that’s what I got from the descriptions you wrote in the methods. I just wanted to test it to see if this is how it works but ughhh it doesn’t work. The worst part is that I can’t build my program at all so I can’t use trial and error methods to do it somehow. Can you please help me out before I pull all my hair out I just can’t figure this out…

Hey Steve,
Thank you so much for this screenshot and sorry for my late reply, I was actually trying out the pigpio library. And if I’m unable to get help for it I will have to resort to using wiringpi in the end after all. There’s just this one concern, since wiringpi and gpio don’t exist on windows, when I compile my project on it I get errors and I can’t build it. Is this correct? And if it is then how should I transfer my file to my rpi? I tried remote debugging and SFTP but since I can’t build the program due to errors I can’t transfer anything.

P.S I’m sorry if this is a really stupid question.

Hi Amna,

You do not need to install wiringPi on windows as it is not running on Windows. Remember that you are remote debugging so it’s only running on the Raspberry Pi .

What you need to is open XoJo. Close the ‘Getting Started Screen’. You should be on the ‘Choose a Project Screen’.
Then click on ‘Examples’. Move right and click on ‘Platform-Specific’ and then click on 'RaspberryPi.
Then click on WiringPi-GPIO.xojo_binary_project. This will open the project.
The bit you need is all that’s inside the GPIO section.
To just get the GPIO section into your project then right click on the ‘GPIO’ label and select ‘Export’.
This will export the ‘GPIO’ section to a Xojo binary file.
Close this program and open your project. On the menu, at the top, select ‘File’ and then import. Select the program you previously exported and click on import.
You now have the wiringPi commands in your project.

Please let me know how you get on.

1 Like

Hello Amna,

There are two options:

  1. if you can’t get it running by the weekend, then we could setup a virtual meeting and I can guide you through the Xojo steps
  2. python tkinter has a nice way to develop universal gui’s, although it is not drag and drop like Xojo.

Let me know if you would like to try this :slight_smile:

Edit: Fixed autocorrect word insertions

1 Like
Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.