Arduino sketch for parnik automation