skip to main content
research-article

Battery-free MakeCode: Accessible Programming for Intermittent Computing

Published: 29 March 2022 Publication History

Abstract

Hands-on computing has emerged as an exciting and accessible way to learn about computing and engineering in the physical world for students and makers of all ages. Current end-to-end approaches like Microsoft MakeCode require tethered or battery-powered devices like a micro:bit, limiting usefulness and applicability, as well as abdicating responsibility for teaching sustainable practices. Unfortunately, energy harvesting computing devices are usually only programmable by experts and require significant supporting toolchains and knowledge across multiple engineering and computing disciplines to work effectively. This paper bridges the gap between sustainable computing efforts, the maker movement, and novice-focused programming environments with MakeCode-Iceberg, a set of compiler extensions to Microsoft's open-source MakeCode project. The extensions automatically and invisibly transform user code in any language supported (Blocks, JavaScript, Python)into a version that can safely and correctly execute across intermittent power failures caused by unreliable energy harvesting. Determining where, when, and what to save in a checkpoint on limited energy, time, and hardware budget is challenging. We leverage the unique intermediate representation of the MakeCode source-to-source compiler to design and deploy various checkpointing techniques. Our approach allows us to provide, for the first time, a fully web-based and toolchain-free environment to program intermittent computing devices, making battery-free operation accessible to all. We demonstrate new use cases with multiple energy harvesters, peripherals, and application domains: including a Smart Terrarium, Step Counter, and Combination Lock. MakeCode-Iceberg provides sustainable hands-on computing opportunities to a broad audience of makers and learners, democratizing access to energy harvesting and battery-free embedded systems.

Supplementary Material

kraemer (kraemer.zip)
Supplemental movie, appendix, image and software files for, Battery-free MakeCode: Accessible Programming for Intermittent Computing

References

[1]
Kofi Sarpong Adu-Manu, Nadir Adam, Cristiano Tapparello, Hoda Ayatollahi, and Wendi Heinzelman. 2018. Energy-harvesting Wireless Sensor Networks (EH-WSNs): A Review. ACM Transactions on Sensor Networks 14, 2 (July 2018), 10:1--10:50.
[2]
Saad Ahmed, Naveed Anwar Bhatti, Muhammad Hamad Alizai, Junaid Haroon Siddiqui, and Luca Mottola. 2019. Efficient intermittent computing with differential checkpointing. In Proceedings of the 20th ACM SIGPLAN/SIGBED International Conference on Languages, Compilers, and Tools for Embedded Systems.
[3]
Saad Ahmed, Naveed Anwar Bhatti, Martina Brachmann, and Muhammad Hamad Alizai. 2021. A survey on program-state retention for transiently-powered systems. Journal of Systems Architecture (2021), 102013.
[4]
Arduino. 2021. UNO WIFI. https://store.arduino.cc/usa/arduino-uno-wifi-rev2. [Online; accessed 02-March-2021].
[5]
ARM. 2021. White Paper: The economics of a trillion connected devices. https://community.arm.com/iot/b/internet-of-things/posts/white-paper-the-route-to-a-trillion-devices. [Online; accessed 02-March-2021].
[6]
Jonny Austin, Howard Baker, Thomas Ball, James Devine, Joe Finney, Peli De Halleux, Steve Hodges, Michał Moskal, and Gareth Stockdale. 2020. The BBC Micro:Bit: From the U.K. to the World. Commun. ACM 63, 3 (Feb. 2020), 62--69. https://doi.org/10.1145/3368856
[7]
Abu Bakar, Alexander G. Ross, Kasim Sinan Yildirim, and Josiah Hester. 2021. REHASH: A Flexible, Developer Focused, Heuristic Adaptation Platform for Intermittently Powered Computing. Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies 5, 3, Article 87 (sep 2021), 42 pages. https://doi.org/10.1145/3478077
[8]
Domenico Balsamo, Alex S Weddell, Anup Das, Alberto Rodriguez Arreola, Davide Brunelli, Bashir M Al-Hashimi, Geoff V Merrett, and Luca Benini. 2016. Hibernus++: a self-calibrating and adaptive system for transiently-powered embedded devices. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems (2016).
[9]
Domenico Balsamo, Alex S Weddell, Geoff V Merrett, Bashir M Al-Hashimi, Davide Brunelli, and Luca Benini. 2015. Hibernus: Sustaining computation during intermittent supply for energy-harvesting systems. IEEE Embedded Systems Letters (2015).
[10]
BBC. 2017. BBC micro:bit celebrates huge impact in first year, with 90% of students saying it helped show that anyone can code. https://www.bbc.co.uk/mediacentre/latestnews/2017/microbit-first-year. [Online; accessed 02-March-2021].
[11]
Naveed Anwar Bhatti, Muhammad Hamad Alizai, Affan A Syed, and Luca Mottola. 2016. Energy harvesting and wireless transfer in sensor network applications: Concepts and experiences. ACM Transactions on Sensor Networks (TOSN) 12, 3 (2016), 1--40.
[12]
Naveed Anwar Bhatti and Luca Mottola. 2017. HarvOS: Efficient code instrumentation for transiently-powered embedded sensing. In 2017 16th ACM/IEEE International Conference on Information Processing in Sensor Networks (IPSN). IEEE, 209--220.
[13]
Alexei Colin and Brandon Lucia. 2016. Chain: tasks and channels for reliable intermittent programs. In Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications.
[14]
Alexei Colin and Brandon Lucia. 2018. Termination checking and task decomposition for task-based intermittent programs. In Proceedings of the 27th International Conference on Compiler Construction. 116--127.
[15]
Alexei Colin, Emily Ruppel, and Brandon Lucia. 2018. A reconfigurable energy storage architecture for energy-harvesting devices. In Proceedings of the Twenty-Third International Conference on Architectural Support for Programming Languages and Operating Systems. 767--781.
[16]
Paul Curzon, Mark Dorling, Thomas Ng, Cynthia Selby, and John Woollard. 2014. Developing computational thinking in the classroom: a framework. (2014).
[17]
Jasper De Winkel, Vito Kortbeek, Josiah Hester, and Przemysław Pawełczak. 2020. Battery-free game boy. Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies 4, 3 (2020), 1--34.
[18]
James Devine, Joe Finney, Peli de Halleux, Michał Moskal, Thomas Ball, and Steve Hodges. 2018. MakeCode and CODAL: intuitive and efficient embedded systems programming for education. ACM SIGPLAN Notices 53, 6 (2018), 19--30.
[19]
Josiah Hester and Jacob Sorber. 2017. Flicker: Rapid Prototyping for the Batteryless Internet-of-Things. In Proceedings of the 15th ACM Conference on Embedded Networked Sensor Systems (Nov. 6-8). ACM, Delft, The Netherlands, 19:1--19:13.
[20]
Josiah Hester and Jacob Sorber. 2017. The future of sensing is batteryless, intermittent, and awesome. In Proceedings of the 15th ACM Conference on Embedded Network Sensor Systems. 1--6.
[21]
Josiah Hester and Jacob Sorber. 2019. Batteries not included. XRDS: Crossroads, The ACM Magazine for Students 26, 1 (2019), 23--27.
[22]
Josiah Hester and Lanny Sitanayah Jacob Sorber. 2015. Tragedy of the Coulombs: Federating Energy Storage for Tiny, Intermittently-Powered Sensors. In Proceedings of the 14th ACM Conference on Embedded Networked Sensor Systems (Nov. 1-4). ACM, Seoul, South Korea, 5--16.
[23]
Josiah Hester, Kevin Storer, and Jacob Sorber. 2017. Timely execution on intermittently powered batteryless sensors. In Proceedings of the 15th ACM Conference on Embedded Network Sensor Systems. 1--13.
[24]
Josiah Hester, Nicole Tobias, Amir Rahmati, Lanny Sitanayah, Daniel Holcomb, Kevin Fu, Wayne P Burleson, and Jacob Sorber. 2016. Persistent clocks for batteryless sensing devices. ACM Transactions on Embedded Computing Systems (TECS) 15, 4 (2016), 1--28.
[25]
Matthew Hicks. 2017. Clank: Architectural Support for Intermittent Computation. In Proceedings of the 44th Annual International Symposium on Computer Architecture.
[26]
Bashima Islam and Shahriar Nirjon. 2020. Zygarde: Time-Sensitive On-Device Deep Inference and Adaptation on Intermittently-Powered Systems. Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies 4, 3 (2020), 1--29.
[27]
Jennifer Jacobs and Leah Buechley. 2013. Codeable Objects: Computational Design and Digital Fabrication for Novice Programmers. In Proc. CHI (Apr. 27 - May. 2). ACM, Paris, France, 1589--1598.
[28]
Junsu Jang and Fadel Adib. 2019. Underwater backscatter networking. In Proceedings of the ACM Special Interest Group on Data Communication. 187--199.
[29]
Hrishikesh Jayakumar, Arnab Raha, Woo Suk Lee, and Vijay Raghunathan. 2015. Quick Recall: A HW/SW Approach for Computing across Power Cycles in Transiently Powered Computers. ACM Journal on Emerging Technologies in Computing Systems (JETC) (2015).
[30]
Karen H Jin, Howard Eglowstein, and Mihaela Sabin. 2018. Using Physical Computing Projects in Teaching Introductory Programming. In Proceedings of the 19th Annual Sig Conference on Information Technology Education. 155--155.
[31]
Pouya Kamalinejad, Chinmaya Mahapatra, Zhengguo Sheng, Shahriar Mirabbasi, Victor CM Leung, and Yong Liang Guan. 2015. Wireless energy harvesting for the Internet of Things. IEEE Communications Magazine 53, 6 (2015), 102--108.
[32]
Hyung-Sin Kim, Michael P Andersen, Kaifei Chen, Sam Kumar, William J Zhao, Kevin Ma, and David E Culler. 2018. System architecture directions for post-soc/32-bit networked sensors. In Proceedings of the 16th ACM Conference on Embedded Networked Sensor Systems. 264--277.
[33]
Vito Kortbeek, Abu Bakar, Stefany Cruz, Kasim Sinan Yildirim, Przemysław Pawełczak, and Josiah Hester. 2020. BFree: Enabling Battery-free Sensor Prototyping with Python. Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies 4, 4 (2020), 1--39.
[34]
Vito Kortbeek, Kasim Sinan Yildirim, Abu Bakar, Jacob Sorber, Josiah Hester, and Przemysław Pawełczak. 2020. Time-sensitive intermittent computing meets legacy software. In Proceedings of the Twenty-Fifth International Conference on Architectural Support for Programming Languages and Operating Systems. 85--99.
[35]
Seulki Lee, Bashima Islam, Yubo Luo, and Shahriar Nirjon. 2019. Intermittent learning: On-device machine learning on intermittently powered system. Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies 3, 4 (2019), 1--30.
[36]
Brandon Lucia, Vignesh Balaji, Alexei Colin, Kiwan Maeng, and Emily Ruppel. 2017. Intermittent computing: Challenges and opportunities. In 2nd Summit on Advances in Programming Languages (SNAPL 2017). Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik.
[37]
Brandon Lucia and Benjamin Ransford. 2015. A simpler, safer programming and execution model for intermittent systems. ACM SIGPLAN Notices (2015).
[38]
Yunfei Ma, Zhihong Luo, Christoph Steiger, Giovanni Traverso, and Fadel Adib. 2018. Enabling deep-tissue networking for miniature medical devices. In Proceedings of the 2018 Conference of the ACM Special Interest Group on Data Communication. 417--431.
[39]
Kiwan Maeng, Alexei Colin, and Brandon Lucia. 2017. Alpaca: intermittent execution without checkpoints. Proceedings of the ACM on Programming Languages (2017).
[40]
Kiwan Maeng and Brandon Lucia. 2018. Adaptive dynamic checkpointing for safe efficient intermittent computing. In 13th USENIX Symposium on Operating Systems Design and Implementation (OSDI 18).
[41]
Kiwan Maeng and Brandon Lucia. 2020. Adaptive Low-Overhead Scheduling for Periodic and Reactive Intermittent Execution. In Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation (London, UK) (PLDI 2020). Association for Computing Machinery, New York, NY, USA, 1005--1021. https://doi.org/10.1145/3385412.3385998
[42]
Andrea Maioli and Luca Mottola. 2021. ALFRED: Virtual Memory for Intermittent Computing. In Proceedings of the 19th ACM Conference on Embedded Networked Sensor Systems (SenSys 2021). 261--273.
[43]
Amjad Yousef Majid, Carlo Delle Donne, Kiwan Maeng, Alexei Colin, Kasim Sinan Yildirim, Brandon Lucia, and Przemysław Pawełczak. 2020. Dynamic task-based intermittent execution for energy-harvesting devices. ACM Transactions on Sensor Networks (TOSN) 16, 1 (2020), 1--24.
[44]
Will McGrath, Daniel Drew, Jeremy Warner, Majeed Kazemitabaar, Mitchell Karchemsky, David Mellis, and Björn Hartmann. 2017. Bifröst: Visualizing and Checking Behavior of Embedded Systems Across Hardware and Software. In Proc. USIT (Oct. 22-25). ACM, Québec City, QC, Canada, 299--310.
[45]
William McGrath, Jeremy Warner, Mitchell Karchemsky, Andrew Head, Daniel Drew, and Bjoern Hartmann. 2018. WiFröst: Bridging the Information Gap for Debugging of Networked Embedded Systems. In Proc. UIST (Oct. 14-17). ACM, Berlin, Germany, 447--455.
[46]
Microbit. 2021. Meet the new BBC micro:bit. https://microbit.org/new-microbit/. [Online; accessed 02-March-2021].
[47]
Microsoft. 2020. MakeCode: Hands on computing education. https://www.microsoft.com/en-us/makecode. [Online; accessed 02-March-2021].
[48]
Microsoft. 2021. MakeCode Maker. https://maker.makecode.com/. [Online; accessed 02-March-2021].
[49]
Nature. 2021. Lithium-ion batteries need to be greener and more ethical. https://www.nature.com/articles/d41586-021-01735-z. [Online; accessed 16-November-2021].
[50]
Stefanos Nikiforos, C Kontomaris, and K Chorianopoulos. 2013. MIT Scratch: A Powerful Tool for Improving Teaching of Programming.
[51]
Erik Pasternak, Rachel Fenichel, and Andrew N Marshall. 2017. Tips for creating a block language with blockly. In 2017 IEEE Blocks and Beyond Workshop (B&B). IEEE, 21--24.
[52]
Powercast. 2021. Wireless energy harvesting and RF Power. https://www.powercastco.com/. [Online; accessed 02-November-2021].
[53]
R Venkatesha Prasad, Shruti Devasenapathy, Vijay S Rao, and Javad Vazifehdan. 2013. Reincarnation in the ambiance: Devices and networks with energy harvesting. IEEE Communications Surveys & Tutorials 16, 1 (2013), 195--213.
[54]
Damith C. Ranasinghe, Roberto L. Shinmoto Torres, Alanson P. Sample, Joshua R. Smith, Keith Hill, and Renuka Visvanathan. 2012. Towards Falls Prevention: a Wearable Wireless and Battery-less Sensing and Automatic Identification-Tag for Real Time Monitoring of Human Movements. In Proc. EMBC (Aug. 28 - Sep. 1). IEEE, San Diego, CA, USA, 6402--6405.
[55]
Benjamin Ransford, Jacob Sorber, and Kevin Fu. 2011. Mementos: System support for long-running computation on RFID-scale devices. In Proceedings of the sixteenth international conference on Architectural support for programming languages and operating systems. 159--170.
[56]
Saul Rodriguez, Stig Ollmar, Muhammad Waqar, and Ana Rusu. 2015. A batteryless sensor ASIC for implantable bio-impedance applications. IEEE transactions on biomedical circuits and systems 10, 3 (2015), 533--544.
[57]
Evan Strasnick, Maneesh Agrawala, and Sean Follmer. 2017. Scanalog: Interactive Design and Debugging of Analog Circuits with Programmable Hardware. In Proc. USIT (Oct. 22-25). ACM, Québec City, QC, Canada, 321--330.
[58]
Vamsi Talla, Bryce Kellogg, Shyamnath Gollakota, and Joshua R Smith. 2017. Battery-free cellphone. Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies 1, 2 (2017), 1--20.
[59]
Joel Van Der Woude and Matthew Hicks. 2016. Intermittent computation without hardware support or programmer intervention. In Proceedings of OSDI'16: 12th USENIX Symposium on Operating Systems Design and Implementation.
[60]
Nicolas Villar and Steve Hodges. 2010. The Peppermill: A human-powered user interface device. In Proceedings of the fourth international conference on Tangible, embedded, and embodied interaction. 29--32.
[61]
David Weintrop and Uri Wilensky. 2017. Comparing Block-Based and Text-Based Programming in High School Computer Science Classrooms. ACM Trans. Comput. Educ. 18, 1, Article 3 (oct 2017), 25 pages. https://doi.org/10.1145/3089799
[62]
Harrison Williams, Xun Jian, and Matthew Hicks. 2020. Forget failure: Exploiting sram data remanence for low-overhead intermittent computation. In Proceedings of the Twenty-Fifth International Conference on Architectural Support for Programming Languages and Operating Systems. 69--84.
[63]
Harrison Williams, Michael Moukarzel, and Matthew Hicks. 2021. Failure sentinels: ubiquitous just-in-time intermittent computation via low-cost hardware support for voltage monitoring. In 2021 ACM/IEEE 48th Annual International Symposium on Computer Architecture (ISCA). IEEE, 665--678.
[64]
Kasım Sinan Yıldırım, Amjad Yousef Majid, Dimitris Patoukas, Koen Schaper, Przemyslaw Pawelczak, and Josiah Hester. 2018. Ink: Reactive kernel for tiny batteryless sensors. In Proceedings of the 16th ACM Conference on Embedded Networked Sensor Systems. 41--53.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies
Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies  Volume 6, Issue 1
March 2022
1009 pages
EISSN:2474-9567
DOI:10.1145/3529514
Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 29 March 2022
Published in IMWUT Volume 6, Issue 1

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Battery-free
  2. Block based programming
  3. Energy Harvesting
  4. Intermittent Computing

Qualifiers

  • Research-article
  • Research
  • Refereed

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)102
  • Downloads (Last 6 weeks)7
Reflects downloads up to 16 Jan 2025

Other Metrics

Citations

Cited By

View all

View Options

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media