labview制成app_Arduino+labview(或蓝牙)的多路继电器或负载控制 附源码与手机APP

这篇博客介绍了如何使用LabVIEW创建一个应用程序,该程序可以远程通过Arduino或蓝牙控制多达20路的继电器或负载。通过详细列举的case语句,展示了对每个继电器的开/关操作,并提供了源代码,帮助读者实现对多个设备的无线控制功能。同时,还提到了将此系统集成到手机APP的可能性。
摘要由CSDN通过智能技术生成

break;

case L9on:

digitalWrite(L9,HIGH);

Serial.println("L9      on");

break;

case L9off:

digitalWrite(L9,LOW);

Serial.println("L9      off");

break;

case L10on:

digitalWrite(L10,HIGH);

Serial.println("L10   on");

break;

case L10off:

digitalWrite(L10,LOW);

Serial.println("L10   off");

break;

case L11on:

digitalWrite(L11,HIGH);

Serial.println("L11   on");

break;

case L11off:

digitalWrite(L11,LOW);

Serial.println("L11   off");

break;

case L12on:

digitalWrite(L12,HIGH);

Serial.println("L12   on");

break;

case L12off:

digitalWrite(L12,LOW);

Serial.println("L12   off");

break;

case L13on:

digitalWrite(L13,HIGH);

Serial.println("L13   on");

break;

case L13off:

digitalWrite(L13,LOW);

Serial.println("L13   off");

break;

case L14on:

digitalWrite(L14,HIGH);

Serial.println("L14   on");

break;

case L14off:

digitalWrite(L14,LOW);

Serial.println("L14   off");

break;

case L15on:

digitalWrite(L15,HIGH);

Serial.println("L15   on");

break;

case L15off:

digitalWrite(L15,LOW);

Serial.println("L15   off");

break;

case L16on:

digitalWrite(L16,HIGH);

Serial.println("L16   on");

break;

case L16off:

digitalWrite(L16,LOW);

Serial.println("L16   off");

break;

case L17on:

digitalWrite(L17,HIGH);

Serial.println("L17   on");

break;

case L17off:

digitalWrite(L17,LOW);

Serial.println("L17   off");

break;

case L18on:

digitalWrite(L18,HIGH);

Serial.println("L18   on");

break;

case L18off:

digitalWrite(L18,LOW);

Serial.println("L18   off");

break;

case L19on:

digitalWrite(L19,HIGH);

Serial.println("L19   on");

break;

case L19off:

digitalWrite(L19,LOW);

Serial.println("L19   off");

break;

case L20on:

digitalWrite(L20,HIGH);

Serial.println("L20   on");

break;

case L20off:

digitalWrite(L20,LOW);

Serial.println("L20   off");

break;

case on:

Serial.println("Allon");

digitalWrite(L1,HIGH);

digitalWrite(L2,HIGH);

digitalWrite(L3,HIGH);

digitalWrite(L4,HIGH);

digitalWrite(L5,HIGH);

digitalWrite(L6,HIGH);

digitalWrite(L7,HIGH);

digitalWrite(L8,HIGH);

digitalWrite(L9,HIGH);

digitalWrite(L10,HIGH);

digitalWrite(L11,HIGH);

digitalWrite(L12,HIGH);

digitalWrite(L13,HIGH);

digitalWrite(L14,HIGH);

digitalWrite(L15,HIGH);

digitalWrite(L16,HIGH);

digitalWrite(L17,HIGH);

digitalWrite(L18,HIGH);

digitalWrite(L19,HIGH);

digitalWrite(L20,HIGH);

break;

case off:

Serial.println("ALLoff");

digitalWrite(L1,LOW);

digitalWrite(L2,LOW);

digitalWrite(L3,LOW);

digitalWrite(L4,LOW);

digitalWrite(L5,LOW);

digitalWrite(L6,LOW);

digitalWrite(L7,LOW);

digitalWrite(L8,LOW);

digitalWrite(L9,LOW);

digitalWrite(L10,LOW);

digitalWrite(L11,LOW);

digitalWrite(L12,LOW);

digitalWrite(L13,LOW);

digitalWrite(L14,LOW);

digitalWrite(L15,LOW);

digitalWrite(L16,LOW);

digitalWrite(L17,LOW);

digitalWrite(L18,LOW);

digitalWrite(L19,LOW);

digitalWrite(L20,LOW);

break;

}

}

}

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值