I am currently trying to build a desktop app that is connected to a raspberry pi in order to move a robot when a button is pressed. I am currently having trouble understanding the GPIO pins and how to use them using the xojo language. I do have the motors working using python however. Thus, I wanted to see if there was a way that when I press the button on Xojo I can use the GPIO pins to move the DC motors. Or since I already have the code in python is there a way I can use that code on Xojo? PLEASE HELP This a project that needs to be done REALLY SOON! Thank you!
I can see that they use servo motors. But, I am confused because they don’t do it when the button is pressed. Right now I am having problems, that when the button is pressed it stays pressed and I don’t see it doing anything else. I can’t press any other button either.
If i test the code through the debugger, instead of building the app would it still function and move the servo motors? Also, with this code, if I put it on a button. It should work when the action is " pressed " correct?
Because I do know I tested this code, but I’m not sure if it can be properly tested if I do it through the debugger.
I thought I would add a picture of what I am trying to do to. Also, I dont know if i understand how to properly translate the python code to xojo language.
Hello Karla, for such things im living in the world of AutoSar, Vector , Mathlab. and many more on the globe,
I suggest to have the low level logic in a python app, where u get all the libs and then have a consumer ( lets call it Xojo app) for the interaction working with standards like sockets, streams on a very simple protocoll ( Telegrams).
Benefit No1 : you can test and debug them independently: which makes your life much easier.
Benefit No2 : you have the libs interfaces, which are deployed / maintained with the devices.
Btw : it’s also possible to separate it physically by adding a arduino to the pi ( like a subsystem )
Node-RED is maybe useful for u, it have a ui designer and a web frontend.
it is installed at pi. can be accessed by browser at phone,tablet,desktop pc.
u need java-script knowlegde for this.
I decided to get the book that helps you out with how to control the movement like i wanted but I am not having trouble understanding the code. I am currently getting this error.
From the screen grabs, it appears that this is a Raspberry Pi 4b with PiGPIO. I don’t understand the error that Xojo is seeing, and if you go to page 29 of the book, there is a section called QuickStart that shows how to get Xojo and Raspberry Pi setup to run an LED blinking test. Could I ask that the QuickStart steps be tried first before starting to troubleshoot the program?