[Gambas-user] Question about gambas and raspberry
Pierre Deswysen
pierre.deswysen at gmail.com
Mon Apr 6 13:51:34 CEST 2020
Hello,
I discover Gambas, which I haven't used for a few years.
I use the pigpio library.
Installation and use ok following example here :
https://elinux.org/RPi_GPIO_Code_Samples#Gambas_with_pigpio
I have a problem because I don't know how to read a GPIO entry without
using a button.
I have this function
> *Public Sub Counter1()*
> *Print "counter"**gpioSetMode(PinButton1, InputPin)*
>
> *Do*
>
> * If gpioRead(PinButton1) = 0 Then*
> * Button1CounterValue = Button1CounterValue + 1*
> * Print CounterValueButton1*
> * ValueBox1.Value = ValueCounterButton1*
> * Wait 1*
> * Endif*
>
> *Loop*
> *End*
I'm running this function in :
*Public Sub Form_Open()*
> *End*
But gambas don't...
I'm thinking of an endless loop problem
Thank you in advance for your advice
Pierre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20200406/88c18929/attachment.html>
More information about the User
mailing list