7 decimal = %00000111
So, when Mister_e states:
The code does just what it says. It keeps only the values of the port bits GPIO 0,1, and 2.Code:sensor = sensor & 7 ' keep only sensor bits
and when Mister_e 's code:
This code checks GPIO to see if it is not = %00000111.Code:until sensor != 7
Bookmarks