[Gambas-user] Question about gambas and raspberry
Fabien Bodard
gambas.fr at gmail.com
Tue Apr 7 00:03:13 CEST 2020
Le lun. 6 avr. 2020 à 17:18, Pierre Deswysen <pierre.deswysen at gmail.com> a
écrit :
> Thank you very much for your help, with the timer it's solved.
> Thanks to Roberto
>
> I don't need to send you an example.
> Thanks to T Lee Davidson
>
>
> Glad that list is still alive and well.
> The forum in french not active 😫
>
>
Does people still speaking french ? ;-)
>
>
> Le lun. 6 avr. 2020 à 15:49, T Lee Davidson <t.lee.davidson at gmail.com> a
> écrit :
>
>> On 4/6/20 7:51 AM, Pierre Deswysen wrote:
>> > 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
>>
>> It is difficult to determine what may be happening especially since you
>> use *three different* variables in the Do loop:
>> Button1CounterValue = Button1CounterValue + 1
>> Print CounterValueButton1
>> ValueBox1.Value = ValueCounterButton1
>>
>> First, you increment Button1CounterValue.
>> Then, you print CounterValueButton1; a different variable.
>> Finally, you assign the value of ValueCounterButton1; yet another
>> different variable.
>>
>> 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
>> what the overall environment is?
>>
>>
>> --
>> Lee
>>
>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20200407/82bdbbae/attachment.html>
More information about the User
mailing list