示例#1
0
        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);
        }
示例#2
0
 void OnMouseUp()
 {
     touched = false;
     KonashiPlugin.DigitalWrite(pin, KonashiLevel.Low);
 }
示例#3
0
 void OnMouseDown()
 {
     touched = true;
     KonashiPlugin.DigitalWrite(pin, KonashiLevel.High);
 }