SetPin(GPnn), FIN query


Author Message
Chopperp

Guru

Joined: 03/01/2018
Location: Australia
Posts: 1126
Posted: 02:01am 26 Aug 2023      

Hi Carl

As far as I know, it is the nature of the beast. so to speak.
You will only get integers with MMBasic, even if you use a longer gate time
(but I could be wrong)

  From the Manual
SETPIN pin, cfg [, option]

FIN Frequency input
 'option' can be used to specify the gate time (the length of time
 used to count the input cycles). It can be any number between 10
 ms and 100000 ms. Note that the PIN() function will always return the frequency
correctly scaled in Hz regardless of the gate  time used. If 'option' is omitted the gate time will be 1 second.

Brian
Edited 2023-08-26 12:19 by Chopperp