use onCode offCode when hitting button