JonDallimore
Member
Hello,
I am programming a numerical keypad, going well so far. I intend to limit it to 3 digit numbers, so 1 would be 001.
I am using variable b1 to store which number key is pressed.
the question is...
How could I convert the number in b1 to binary, and then use that to control all 8 outputs on a 20 M2?
ie, if the numbers 001 is pressed, I would like pinsB to output as %00000001 and so on. This can then be read at another 20M2 and interpreted as a number again.
I also want to use a serial output at some point, but Im pretty confident with that.
Why both you ask? As a method of teaching students about binary, but also having a dirt simple serial backup.
Hope someone can come up with some useful ideas.
Thanks
Jon
I am programming a numerical keypad, going well so far. I intend to limit it to 3 digit numbers, so 1 would be 001.
I am using variable b1 to store which number key is pressed.
the question is...
How could I convert the number in b1 to binary, and then use that to control all 8 outputs on a 20 M2?
ie, if the numbers 001 is pressed, I would like pinsB to output as %00000001 and so on. This can then be read at another 20M2 and interpreted as a number again.
I also want to use a serial output at some point, but Im pretty confident with that.
Why both you ask? As a method of teaching students about binary, but also having a dirt simple serial backup.
Hope someone can come up with some useful ideas.
Thanks
Jon