惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Stack Overflow Blog
Stack Overflow Blog
Y
Y Combinator Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
M
MIT News - Artificial intelligence
GbyAI
GbyAI
A
About on SuperTechFans
T
The Blog of Author Tim Ferriss
雷峰网
雷峰网
Blog — PlanetScale
Blog — PlanetScale
J
Java Code Geeks
IT之家
IT之家
Microsoft Azure Blog
Microsoft Azure Blog
V
V2EX
爱范儿
爱范儿
N
Netflix TechBlog - Medium
U
Unit 42
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
博客园 - 叶小钗
G
Google Developers Blog
Jina AI
Jina AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The GitHub Blog
The GitHub Blog
腾讯CDC

博客园 - 玛雅人

五大学习方法 Python AI 与深度学习:每周任务拆分及代码练手 Python AI 与深度学习 - D2.MNIST 手写数字识别 Python基础 - 常用类库汇总 Python AI 与深度学习 - D1.PyTorch 深度学习环境一键配置 ARDUINO - P2:按钮控制LED Python调用SQLLite3 IIS8.5 安装证书 Kendo 计算字段 Kendo UI 的 k-template UpdatePanel中用后台CS代码调用JS代码,先执行控件事件,后触发JS SQL常用 Node.js 安装 生成缩略图 有用的JS函数 vs2010 mvc3 运算符 || && 如何阻止ASP.NET的按钮控件提交页面 IIS Form 认证 保护HTML页面
ARDUINO - P1:BLink
玛雅人 · 2026-02-03 · via 博客园 - 玛雅人
 1 void setup() {
 2   // initialize digital pin LED_BUILTIN as an output.
 3   pinMode(LED_BUILTIN, OUTPUT);
 4 }
 5 
 6 // the loop function runs over and over again forever
 7 void loop() {
 8   digitalWrite(LED_BUILTIN, HIGH);  // turn the LED on (HIGH is the voltage level)
 9   delay(1000);                      // wait for a second
10   digitalWrite(LED_BUILTIN, LOW);   // turn the LED off by making the voltage LOW
11   delay(1000);                      // wait for a second
12 }

知识点:

1.常量 
  LED_BUILTIN :ARDUINO版LED对的端口(目前是13)
  HIGH:高电平(1)
  LOW:低电平(0)

2. pinMode//设置端口的工作模式

3.digitalWrite //向指定的端口输出高电平或低电平

4.delay //延长函数,毫秒