Thought you guys might enjoy this one… a PIN Entry keypad concept.
Basically, the ‘enter’, ‘reset’, A-F and 0-9 ‘keys’ are just Device tiles all linked to the same hub variable. Each one sets that variable – using Tap ► Custom Command ► setVariable – to the assigned character or string.
Back on HE, there’s an RM5.1 rule watching for that variable to change. A series of Conditionals handles the rest:
- If the new value is ‘reset’, everything gets reset and the display (pulling from a different hub variable’s connector) will read ‘Enter PIN’
- If the new value is ‘enter’, then a nested set of Conditionals checks whether the entered PIN (stored in a local accumulator variable in RM) matches the actual PIN (stored in Hub Variables); if they match, “SUCCESS!”, and if they don’t, “FAIL!” is displayed.
- Otherwise, with every successive keypress (A-F or 0-9), the accumulator appends the new char to itself, and the display does the same by appending another asterisk (to mimic a password field).