环境搭建参考这篇帖子http://bbs.ai-thinker.com/forum. ... amp;_dsign=4c8c38c3
arduino默认的LED是IO32
UNO-ET485的LED用的是IO11
这里不使用内置的LED,自己定义LED的IO
- #define UNO_LED 11
- void setup() {
- // set LED output
- pinMode(UNO_LED, OUTPUT);
- }
- void loop() {
- // put your main code here, to run repeatedly:
- digitalWrite(UNO_LED, HIGH); // turn the LED on (HIGH is the voltage level)
- delay(1000);
- digitalWrite(UNO_LED, LOW); // turn the LED off by making the voltage LOW
- delay(1000);
- }
复制代码 运行效果
如果你想修改默认IO的定义,文件位置在C:\Users\用户名\AppData\Local\Arduino15\packages\bouffalolab\hardware\bouffalolab\1.0.5\variants\BL618G0
|