<div dir="ltr"><div dir="ltr">Thank you very much for your help, with the timer it's solved.</div><div dir="ltr">  Thanks to Roberto </div><div dir="ltr"> <br>I don't need to send you an example.<div> 

Thanks to T Lee Davidson</div><div><br></div><div><br>Glad that list is still alive and well.<br>The forum in french not active 😫<br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le lun. 6 avr. 2020 à 15:49, T Lee Davidson <<a href="mailto:t.lee.davidson@gmail.com">t.lee.davidson@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 4/6/20 7:51 AM, Pierre Deswysen wrote:<br>
> Hello,<br>
> <br>
> I discover Gambas, which I haven't used for a few years.<br>
> <br>
> I use the pigpio library.<br>
> Installation and use ok following example here :<br>
> <a href="https://elinux.org/RPi_GPIO_Code_Samples#Gambas_with_pigpio" rel="noreferrer" target="_blank">https://elinux.org/RPi_GPIO_Code_Samples#Gambas_with_pigpio</a><br>
> <br>
> I have a problem because I don't know how to read a GPIO entry without using a button.<br>
> <br>
> <br>
> I have this function<br>
> <br>
>     /Public Sub Counter1()<br>
>     //Print "counter"<br>
>     //gpioSetMode(PinButton1, InputPin)/<br>
>     /Do<br>
>     //<br>
>     //  If gpioRead(PinButton1) = 0 Then<br>
>     //    Button1CounterValue = Button1CounterValue + 1<br>
>     //     Print CounterValueButton1<br>
>     // ValueBox1.Value = ValueCounterButton1<br>
>     //    Wait 1<br>
>     //  Endif<br>
>     //<br>
>     //Loop<br>
>     /<br>
>     /End/<br>
> <br>
> <br>
> I'm running this function in :<br>
> <br>
>     /Public Sub Form_Open()//<br>
>     //End/<br>
> <br>
> <br>
> But gambas don't...<br>
> I'm thinking of an endless loop problem<br>
> <br>
> Thank you in advance for your advice<br>
> <br>
> Pierre<br>
<br>
It is difficult to determine what may be happening especially since you use *three different* variables in the Do loop:<br>
     Button1CounterValue = Button1CounterValue + 1<br>
      Print CounterValueButton1<br>
  ValueBox1.Value = ValueCounterButton1<br>
<br>
First, you increment Button1CounterValue.<br>
Then, you print CounterValueButton1; a different variable.<br>
Finally, you assign the value of ValueCounterButton1; yet another different variable.<br>
<br>
And, the example you linked to does not have any of that. Could you perhaps send a complete example project so we can better see <br>
what the overall environment is?<br>
<br>
<br>
-- <br>
Lee<br>
<br>
----[ <a href="http://gambaswiki.org/wiki/doc/netiquette" rel="noreferrer" target="_blank">http://gambaswiki.org/wiki/doc/netiquette</a> ]----<br>
</blockquote></div></div>