模拟输入引脚 - analogRead(A0);
adruino api查询 http://www.taichi-maker.com/homepage/reference-index/arduino-code-reference/
Tx是发送Rx是接收
如果想让arduino和esp8266进行通信可以把
arduino.tx :: esp.Rx
arduino.Rx :: esp.Tx
GPIO: 通用型输入输出接口
arduino 本身有一对串口 tx rx,然后这对串口被占用之后就需要使用软串口进行数据通信
软串口
#include <SoftwareSerial.h>SoftwareSerial monitor(8, 9); // RX, TXint serial_putc( char c, struct __file * ){Serial.write( c );monitor.write( c );return c;}void printf_begin(void){fdevopen( &serial_putc, 0 );}void setup() {Serial.begin(115200);monitor.begin(115200);printf_begin();}void loop(){printf("qwq\r\n");delay(1000);}
点灯
void setup() {pinMode(13, OUTPUT);}void loop() {digitalWrite(13, HIGH);delay(1000);digitalWrite(13, LOW);delay(1000);}
vscode 拓展
安装0.45版本的arduino拓展,最新版的有问题
first u need to specify the path of your arduino, u can use command+, to set
安上了之后选择串口,选板子类型,运行
运行的时候会生成c_cpp….json, it helps you complete your code
it’ll generate $^&Code when you run it on windows, but on mac it does not exists
https://stackoom.com/question/2xot5
https://www.daimajiaoliu.com/daima/4e76f63dd900409
https://blog.csdn.net/sheng1522098487/article/details/79885501
https://wenku.baidu.com/view/43ba33c048d7c1c709a14581.html
https://www.arduino.cn/thread-18366-1-1.html
https://blog.csdn.net/RachelKong/article/details/77374620#include
