Intro to the Arduino.ppt
《Intro to the Arduino.ppt》由会员分享,可在线阅读,更多相关《Intro to the Arduino.ppt(30页珍藏版)》请在麦多课文档分享上搜索。
1、Intro to the Arduino,Topics: The ArduinoDigital IOAnalog IO Serial Communication,Topic 1: Meet Arduino Uno,Getting Started,Check out: http:/arduino.cc/en/Guide/HomePage Download & install the Arduino environment (IDE) (not needed in lab) Connect the board to your computer via the USB cable If needed
2、, install the drivers (not needed in lab) Launch the Arduino IDE Select your board Select your serial port Open the blink example Upload the program,Arduino IDE,See: http:/arduino.cc/en/Guide/Environment for more information,Select Serial Port and Board, from Theory and Practice of Tangible User Int
3、erfaces at UC Berkley,Topic 2: Digital Input/Output,Digital IO is binary valuedits either on or off, 1 or 0 Internally, all microprocessors are digital, why?,1,0,Arduino Digital I/0,pinMode(pin, mode) Sets pin to either INPUT or OUTPUTdigitalRead(pin) Reads HIGH or LOW from a pindigitalWrite(pin, va
4、lue) Writes HIGH or LOW to a pinElectronic stuff Output pins can provide 40 mA of current Writing HIGH to an input pin installs a 20K pullup, First Program,IO Pins,Image from Theory and Practice of Tangible User Interfaces at UC Berkley,In-class Exercise 1: Digital IO,Use a push-button to turn ON/Of
5、f LED,Topic 3: Analog Input,Think about music stored on a CD-an analog signal captured on digital media Sample rate Word length,Resolution: the number of different voltage levels (i.e., states) used to discretize an input signal Resolution values range from 256 states (8 bits) to 4,294,967,296 state
6、s (32 bits) The Arduino uses 1024 states (10 bits) Smallest measurable voltage change is 5V/1024 or 4.8 mV Maximum sample rate is 10,000 times a second,Arduino Analog Input,Image credit: Tod Kurt,How does ADC work?,How does ADC work Excel Demonstration,Can a digital devise produce analog output?,Top
7、ic 3: Analog Output,Analog output can be simulated using pulse width modulation (PWM),Image from Theory and Practice of Tangible User Interfaces at UC Berkley,Pulse Width Modulation,Cant use digital pins to directly supply say 2.5V, but can pulse the output on and off really fast to produce the same
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
2000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- INTROTOTHEARDUINOPPT
