STM32C6T6的Ardunio使用
STM32C6T6的Ardunio使用
2022年1月20日
22:45
- STM32包的安装:
参考:怎样用ArduinoIDE对STM32F103C8T6进行编程-电子发烧友网 (elecfans.com)
- 工程的建立:
- 读取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://blog.csdn.net/chengshui565665/article/details/100991436