STM32C6T6的Ardunio使用

STM32C6T6Ardunio使用

2022120

22:45

  • STM32包的安装:

参考:怎样用ArduinoIDE对STM32F103C8T6进行编程-电子发烧友网 (elecfans.com)

  • 工程的建立:

   

   

  1. 读取ADC的示例代码:

const int analogInputPin = PA0;

   

void setup()

{

pinMode(analogInputPin, INPUT_ANALOG);

Serial.begin(115200);

}

   

void loop() {

int analogValue = analogRead(analogInputPin);

Serial.println(analogValue);

delay(10);

}

   

  • 上传代码

上传前需要按一下板子上的复位键。

   

使用的板卡的引脚定义如下图所示:

   

   

串口连接方法:

   

   

   

出现这个问题时,需要按一下板子上的复位键。

   

   

参考资料:

http://www.elecfans.com/d/1002467.html

https://www.cnblogs.com/birdBull/p/13895867.html

https://circuitdigest.com/microcontroller-projects/getting-started-with-stm32-blue-pill-development-board-stm32f103c8-using-arduino-ide

https://blog.csdn.net/chengshui565665/article/details/100991436

posted @ 2022-01-24 01:30  船里的河  阅读(551)  评论(0编辑  收藏  举报