Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : Reading Analog Input Explore 64
Author | Message | ||||
envirotronics Newbie Joined: 18/02/2016 Location: AustraliaPosts: 23 |
Hi all. I am getting Analog input on a Explore 64 and printing it to a screen. The result is anything up to 5-6 decimal places. Is there anyway I can restrict the result to two decimal places? Cheers Graham |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3167 |
Use the Str$() function. For example: PRINT Str$(pin(x), 1, 2) Geoff Geoff Graham - http://geoffg.net |
||||
envirotronics Newbie Joined: 18/02/2016 Location: AustraliaPosts: 23 |
Thanks Geoff That worked Cheers Graham |
||||
Print this page |