收藏 分销(赏)

ARDUINO编程语法基础省公共课一等奖全国赛课获奖课件.pptx

上传人:快乐****生活 文档编号:2989184 上传时间:2024-06-12 格式:PPTX 页数:25 大小:111.76KB
下载 相关 举报
ARDUINO编程语法基础省公共课一等奖全国赛课获奖课件.pptx_第1页
第1页 / 共25页
ARDUINO编程语法基础省公共课一等奖全国赛课获奖课件.pptx_第2页
第2页 / 共25页
ARDUINO编程语法基础省公共课一等奖全国赛课获奖课件.pptx_第3页
第3页 / 共25页
ARDUINO编程语法基础省公共课一等奖全国赛课获奖课件.pptx_第4页
第4页 / 共25页
ARDUINO编程语法基础省公共课一等奖全国赛课获奖课件.pptx_第5页
第5页 / 共25页
点击查看更多>>
资源描述

1、ARDUINO 编程语法基础第1页结构setup()loop()当项目开始运行时会调用setup()函数 常我们在其中初始化一些变量、引脚状态及一些调用库等loop函数是一个循环体,其中程序将会不停运行 示例示例int buttonPin=3;void setup()Serial.begin(9600);pinMode(buttonPin,INPUT);void loop()if(digitalRead(buttonPin)=HIGH)serialWrite(H);else serialWrite(L);delay(1000);第2页控制结构ifif.elseforswitch casewhi

2、ledo.whilebreakcontinuereturngoto第3页语法;(分号)(大括号)/(胆寒注释)/*/(多汗注释)#define#include第4页算术运算符=(assignment operator)+(addition)-(subtraction)*(multiplication)/(division)%(modulo)第5页比较运算符=(equal to)!=(not equal to)(greater than)=(greater than or equal to)第6页布尔运算符&(and)|(or)!(not)第7页指针运算符*dereference operato

3、r&reference operator第8页位运算符&(bitwise and)|(bitwise or)(bitwise xor)(bitwise not)(bitshift right)第9页复合运算符+(increment)-(decrement)+=(compound addition)-=(compound subtraction)*=(compound multiplication)/=(compound division)&=(compound bitwise and)|=(compound bitwise or)第10页数值数值常量HIGH|LOWINPUT|OUTPUT|I

4、NPUT_PULLUPtrue|falseinteger constantsfloating point constants第11页数值数值数据类型voidbooleancharunsigned charbyteintunsigned intwordlongunsigned longfloatdoublestring-char arrayString-objectarray第12页数值数值转换char()byte()int()word()long()float()第13页数值数值变量范围与限定符variable scopestaticvolatileconstUtilitiessizeof()

5、第14页函数函数数字数字 I/OpinMode()digitalWrite()digitalRead()第15页模拟模拟 I/OanalogReference()analogRead()analogWrite()-PWM第16页高级高级 I/Otone()noTone()shiftOut()shiftIn()pulseIn()第17页时间时间millis()micros()delay()delayMicroseconds()第18页数学数学min()max()abs()constrain()map()pow()sqrt()第19页三角函数三角函数sin()cos()tan()第20页随机数随机数randomSeed()random()第21页位与字节位与字节lowByte()highByte()bitRead()bitWrite()bitSet()bitClear()bit()第22页外部中止外部中止attachInterrupt()detachInterrupt()第23页通信通信SerialStream第24页USB(仅适合用于(仅适合用于Leonardo、Due、Micro)KeyboardMouse第25页

展开阅读全文
相似文档                                   自信AI助手自信AI助手
猜你喜欢                                   自信AI导航自信AI导航
搜索标签

当前位置:首页 > 教育专区 > 其他

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        获赠5币

©2010-2024 宁波自信网络信息技术有限公司  版权所有

客服电话:4008-655-100  投诉/维权电话:4009-655-100

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :gzh.png    weibo.png    LOFTER.png 

客服