phil99
 Guru
 Joined: 11/02/2018 Location: AustraliaPosts: 3319 |
| Posted: 01:30pm 12 May 2025 |
|
|
|
I made a mistake. 6 pins is 0 to 5 so:- PORT(GP2,6) = 1 << CInt(Rnd * 5) or PORT(GP2,6) = 1 << Rnd * 5
As MMBasic automatically converts the float to an integer in this situation. Edited 2025-05-12 23:36 by phil99 |