|
不知道别人有没有遇到这种情况,PICO找不到端口。
- /*
- 开发板选择Arduino Mbed OS RP2040 Boards -Raspberry Pi Pico
- 按住BOOTSEL然后插上USB长按3秒,松开,然后upload通过
- 程序正常运行后将找不到USB,找不到端口
- Windows7系统, IDE:Arduino 1.8.15
- */
- // the setup function runs once when you press reset or power the board
- void setup() {
- // initialize digital pin LED_BUILTIN as an output.
- pinMode(LED_BUILTIN, OUTPUT);
- pinMode(1,OUTPUT);
- Serial.begin(115200);
- }
- // the loop function runs over and over again forever
- void loop() {
- Serial.print("Hello Pico!"); //串口不可用
- digitalWrite(1,LOW);
- digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
- delay(1000); // wait for a second
- digitalWrite(1,HIGH);
- digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
- delay(1000); // wait for a second
- }
复制代码
|
|