InK: Reactive kernel for tiny batteryless sensors