IEnumerator _RunLED() { float duration = 0.5f; LogF("1:ON"); KonashiPlugin.DigitalWrite(KonashiDigitalIOPin.DigitalIO1, KonashiLevel.High); yield return(new WaitForSeconds(duration)); KonashiPlugin.DigitalWrite(KonashiDigitalIOPin.DigitalIO1, KonashiLevel.Low); LogF("2:ON"); KonashiPlugin.DigitalWrite(KonashiDigitalIOPin.DigitalIO2, KonashiLevel.High); yield return(new WaitForSeconds(duration)); KonashiPlugin.DigitalWrite(KonashiDigitalIOPin.DigitalIO2, KonashiLevel.Low); LogF("3:ON"); KonashiPlugin.DigitalWrite(KonashiDigitalIOPin.DigitalIO3, KonashiLevel.High); yield return(new WaitForSeconds(duration)); KonashiPlugin.DigitalWrite(KonashiDigitalIOPin.DigitalIO3, KonashiLevel.Low); LogF("4:ON"); KonashiPlugin.DigitalWrite(KonashiDigitalIOPin.DigitalIO4, KonashiLevel.High); yield return(new WaitForSeconds(duration)); KonashiPlugin.DigitalWrite(KonashiDigitalIOPin.DigitalIO4, KonashiLevel.Low); }
void OnMouseUp() { touched = false; KonashiPlugin.DigitalWrite(pin, KonashiLevel.Low); }
void OnMouseDown() { touched = true; KonashiPlugin.DigitalWrite(pin, KonashiLevel.High); }