Sample code for Internet of Things activities