View full-text article in PMC Sensors (Basel). 2022 Jul 13;22(14):5235. doi: 10.3390/s22145235 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). PMC Copyright notice Algorithm 1 Manipulation sensing OldTouchStatus←0 repeat for all {InputTouchi|1≤i≤5} do if InputTouchi is Touched then InputTouchi←1 else InputTouchi←0 end if end for ∑i=15(Touchedi←2i∗InputTouchi) ▹ (Equation (2)). if TouchStatus≠OldTouchStatus then Publish Message with TouchStatus OldTouchStatus←TouchStatus end if until Deep Sleep Mode