rudy2
New Member
Posts: 3
|
Post by rudy2 on Jun 16, 2024 13:05:35 GMT
Hi everybody, I'm new on the forum. In the past I med a lot of software wit MS-Basic PDS and ASM libs (AJS from LA) to work with DBF files (Color mixing, paint formulas... etc...). I installed QB64 on a Raspberry-PI3 Model B+ Because during compilation of QB64 I ran into memory errors, I placed the micro-card in a PI4 model with 4G ram, and bingo.... compiling successful. Thereafter I have placed the micro-card in the PI3 and QB64 works perfect! But now my question: I will access the GPIO pins on the Raspberry
The well known c-library WiringPI should be ideal
Does somebody of You have experiences with this library? OR: Do You know other manners to access the GPIO pins on the Rapsberry with QB64 Sincerely Yours, rudy2
|
|
|
Post by Ultraman on Jun 17, 2024 11:18:02 GMT
I never have used a Raspberry PI but I have quite a bit of experience with using external libraries in QB64. I would have no way of testing anything so it would be all up to you but I could maybe assist in getting the code started.
|
|
rudy2
New Member
Posts: 3
|
Post by rudy2 on Jun 17, 2024 15:12:36 GMT
Thank you very much for your proposal. WiringPI is a 100% C-lib projects.drogon.net/raspberry-pi/wiringpi/github.com/WiringPi/WiringPipinout.xyz/pinout/wiringpiI got it working in Freebasic, but I intend to rewrite my software in QB64 (reason: Many built-in software (libraries) in QB64 for which I have to use separate libraries in Freebasic each time. The software I am working on now is a beer brewing program. No, not beer formulation but literally controlling the brewing process (for beer brewers: the mashing and cooking process). For this I want from QB64: Read the Dallas DS18B20 temperature probe. This is not a problem because this is NOT via WiringPI. I already wrote software for this in Freebasic. I can easily rewrite this for QB64, so this is no problem. But I use WiringPI to switch ON or OFF via SSR relay connected to the GPIO pins of the Raspberry. So in the software you will read something like: - Heating ON or Heating OFF - Pump ON or Pump OFF Because WiringPI is a c-lib it would be interesting to use this well-functioning library with QB64 (you don't have to reinvent the wheel...). But who knows, maybe someone on this forum has another (simpler?) solution. Thanks again for your reply, rudy2 (text partially translated via Google translate)
|
|
rudy2
New Member
Posts: 3
|
Post by rudy2 on Jun 19, 2024 15:35:32 GMT
EURECA There is a very simple and good working solution Normally on each raspberry there is already present: "raspi-gpio" If not You can install it: github.com/RPi-Distro/raspi-gpioTake care: You need to have root-access (see link how to make give a user access to raspi-gpio) For me this was not a problem because I use the RaspberryPI without any wireless or wired internet-connection. More info or to explore on Your Raspberry activate a terminal and type: "raspi-gpio help" and/or "raspi-gpio get". I did already a little test and rewrote "blink.bas" (working with the c-lib WiringPI) as "blink_qb64". rudy2 Attachments:blink_qb64.bas (624 B)
|
|
|
Post by Ultraman on Jun 24, 2024 18:37:22 GMT
Yeah, I don't have a Raspberry PI. I can't do any of that stuff you sent.
|
|