核心职能 Simple programs that demonstrate basic Arduino commands.简单的程序,演示基本的Arduino命令。 The are included with the Arduino environment; to open them, click the Open button on the toolbar and look in the examples folder.这些都包含在Arduino环境,打开它们,单击工具栏上的打开按钮,并期待在examples文件夹。 1.Basics 1.Basics ∙ BareMinimumdean : The bare minimum of code needed to start an Arduino sketch. BareMinimum :最低限度的代码需要启动一个Arduino草图。 ∙ Blink : Turn an LED on and off. 闪烁 :开启LED的开启和关闭。 ∙ DigitalReadSerial : Read a switch, print the state out to the Arduino Serial Monitor. DigitalReadSerial :阅读交换机,打印到Arduino串行监视器的状态。 ∙ AnalogReadSerial : Read a potentiometer, print it's state out to the Arduino Serial Monitor. AnalogReadSerial :阅读电位器,打印到Arduino串行监视器,它的状态。 ∙ Fade : Demonstrates the u of analog output to fade an LED. 褪色 :演示使用模拟输出褪色的LED。 2.Digital 2.Digital ∙ Blink Without Delay : blinking an LED without using the delay() function. 毫不拖延地闪烁 :闪烁的LED不使用延迟()函数。 加盟英语培训学校∙ Button : u a pushbutton to control an LED. 按钮 :使用一个按钮来控制一个LED。 ∙ Debounce : read a pushbutton, filtering noi. 防抖动 :读一个按钮,过滤噪声。 ∙ Button State Change : counting the number of button pushes. 按钮状态的变化 :计数按钮推。 ∙ Tone : play a melody with a Piezo speaker. 音 :用压电扬声器播放的旋律。 ∙ Pitch follower : play a pitch on a piezo speaker depending on an analog input. 间距追随者 :发挥取决于模拟输入压电扬声器的音调。 ∙ Simple Keyboard : a three-key musical keyboard using force nsors and a piezo speaker. 简单的键盘 :三键的音乐键盘,使用武力传感器和压电扬声器。 ∙ Tone4 : play tones on multiple speakers quentially using the tone() command. tone4 :顺序播放多个扬声器的音音()命令。 3.Analog 3.Analog tried∙ AnalogInOutSerial : read an analog input pin, map the result, and then u that data to dim or brighten an LED. AnalogInOutSerial :读取模拟输入引脚,图的结果,然后用这些数据来变暗或变亮的LED。 ∙ Analog Input : u a potentiometer to control the blinking of an LED. 模拟输入 :使用电位器来控制LED的闪烁。 ∙ AnalogWriteMega : fade 12 LEDs on and off, one by one, using an Arduino Mega board. AnalogWriteMega :淡出12个LED开启和关闭,一个接一个,使用一个Arduino兆丰板。 ∙ Calibration : define a maximum and minimum for expected analog nsor values. 校准 :定义一个最高和最低预期的模拟传感器值。 ∙ Fading : u an analog output (PWM pin) to fade an LED. 褪色 :使用模拟输出(PWM引脚)褪色的LED。 ∙ Smoothing : smooth multiple readings of an analog input. 平滑 :平滑的模拟输入多个读数。 4.Communication 4.Communication The examples include code that allows the Arduino to talk to Processing sketches running on the computer. 这些例子包括代码,允许在Arduino谈在计算机上运行的处理草图。 For more information or to download Processing, e . There are also Max/MSP patches that can communicate with each Arduino sketch as well. 欲了解更多信息或下载处理,看到预订单“,也有MAX / MSP的补丁,可以沟通与每个Arduino的草图以及。 For more on Max/MSP e Cycling 74 . Max / MSP中, 骑自行车74 。 For Pd patches that can communicate with the sketches, e Scott Fitzgerald's examples .对于钯补丁,可以沟通,这些草图,看到斯科特·菲茨杰拉德的例子 。 ∙ ASCII Table : demonstrates Arduino's advanced rial output functions. ASCII表 :演示阿尔杜伊诺先进的串行输出功能。 ∙ Dimmer : move the mou to change the brightness of an LED. 调光 :移动鼠标来改变LED的亮度。 埃菲尔铁塔的英文∙ Graph : nd data to the computer and graph it in Processing. 图表 :发送数据的计算机和图形处理中。 ∙ Physical Pixel : turn a LED on and off by nding data to your Arduino from Processing or Max/MSP. 物理像素 :打开加工或Max / MSP的数据发送到您的Arduino的LED和关闭。 ∙ Virtual Color Mixer : nd multiple variables from Arduino to your computer and read them in Processing or Max/MSP. 虚拟调色 :从阿尔杜伊诺到您的计算机发送多变量,和他们在处理或Max / MSP的阅读。 ∙ Serial Call Respon : nd multiple vairables using a call-and-respon (handshaking) method. 串行调用的响应 :发送多个vairables使用调用和响应(握手)方法。 ∙ Serial Call Respon ASCII : nd multiple variables using a call-and-respon (handshaking) method, and ASCII-encode the values before nding. 串行调用的响应ASCII :发送多个变量,调用和响应(握手)的方法,和ASCII编码发送前值。 ∙ SerialEvent : Demonstrates the u of SerialEvent (). SerialEvent :演示使用的SerialEvent()。 ∙ Serial input (Switch (ca) Statement) : how to take different actions bad on characters received by the rial port. 串行输入(开关(案件)声明) :如何采取不同的行动基于串口接收到的字符。 ∙ MIDI : nd MIDI note messages rially. MIDI :串行发送MIDI音符信息。 ∙ MultiSerialMega : u two of the rial ports available on the Arduino Mega. MultiSerialMega :使用两个可用串行端口的Arduino万。 5.Control Structures 5。控制结构 ∙ If Statement (Conditional): how to u an if statement to change output conditions bad on changing input conditions. 如果声明 (视情况而定):如何使用if语句来改变输出条件改变输入条件的基础上。 ∙ For Loop : controlling multiple LEDs with a for loop and. 循环 :循环控制多个 LED。 ∙ Array : a variation on the For Loop example that demonstrates how to u an array. 数组 :For循环的例子演示了如何使用数组的变化。 ∙ While Loop : how to u a while loop to calibrate a nsor while a button is being read. While循环 :如何使用一个while循环来校准传感器,而正在读取一个按钮。 ∙ Switch Cai wanna be with you : how to choo between a discrete number of values. 切换案例 :如何选择之间的离散值的数量。Equivalent to multiple If statements.相当于多个if语句。This example shows how to divide a nsor's range into a t of four bands and to take four different actions depending on which band the result is in.这个例子显示如何分成一组四阶传感器的范围,并采取四种不同的行动,取决于频段的结果是英寸 ∙ Switch Ca 2 : a cond switch-ca example, showing how to take different actions bad in characters received in the rial port. 切换案例2 :第二个开关的案例,说明如何采取不同的行动基于串口接收到的字符。 6.Sensors 6.Sensors ∙ ADXL3xx : read an ADXL3xx accelerometer. ADXL3xx :读取ADXL3xx加速度。 ∙ Knock : detect knocks with a piezo element. 敲 :检测用压电元件敲。 ∙ Memsic2125 : two-axis acceleromoter. memsic2125 :两轴acceleromoter。 ∙ Ping : detecting objects with an ultrasonic range finder. 平 :用超声波测距仪检测对象。 7.Display 7.Display Examples of basic display control基本陈列控制的例子 ∙ LED Bar Graph : how to make an LED bar graph. LED条形图 :如何使一个LED条形图。 ∙ Row Column Scanning : how to control an 8x8 matrix of LEDs . 行的列扫描 :如何控制LED 的 8x8的矩阵。 8.Strings 8.Strings ∙ StringAdditionOperator : add strings together in a variety of ways. StringAdditionOperator :中添加各种不同的方式串在一起。 ∙ StringAppendOperator : append data to strings. StringAppendOperator :数据追加到字符串。 ∙ StringCaChanges : change the ca of a string. StringCaChanges :改变一个字符串的情况下。 ∙ StringCharacters : get/t the value of a specific character in a string. StringCharacters :获取/设置一个字符串中特定字符的值。 ∙ StringComparisonOperators : compare strings alphabetically. StringComparisonOperators :比较字符串按字母顺序排列。 ∙ StringConstructors : how to initialize string objects. StringConstructors :如何初始化字符串对象。 ∙ StringIndexOf : look for the first/last instance of a character in a string. StringIndexOf :寻找字符串中的字符的第一个/最后一个实例。 ∙ StringLength & StringLengthTrim : get and trim the length of a string. StringLength StringLengthTrim :获取和修剪一个字符串的长度。 ∙ StringReplace : replace individual characters in a string. StringReplace :替换字符串中的单个字符。 ∙ StringStartsWithEndsWith : check which characters/substrings a given string starts or ends with. StringStartsWithEndsWith :检查一个给定的字符串字符/子串开始或结尾。 ∙ StringSubstring : look for "phras" within a given string. StringSubstring :看“短语”在一个给定的字符串。arrange | Libraries 图书馆 百度翻译器Examples from the libraries that are included in the Arduino software.从库是包含在Arduino软件的例子。 EEPROM Library EEPROM的图书馆 ∙ EEPROM Clear : clear the bytes in the EEPROM. EEPROM清除 :清除字节的EEPROM。 ∙ EEPROM Read : read the EEPROM and nd its values to the computer. EEPROM读 :读EEPROM和计算机发送其值。 ∙ EEPROM Write : stores values from an analog input to the EEPROM. EEPROM写 :从存储到EEPROM的模拟输入值。 Ethernet Library以太网图书馆 ∙ ChatServer : t up a simple chat rver. ChatServer :建立一个简单的聊天服务器。 ∙ WebClient : make a HTTP request. WebClient的 :做一个HTTP请求。 ∙ WebServer : host a simple HTML page that displays analog nsor values. Web服务器 :承载一个简单的HTML页面,显示模拟传感器的值。 ∙ PachubeClient : connect , a free datalogging site. PachubeClient :连接到,一个免费的数据记录网站。 ∙ PachubeClientString : nd strings PachubeClientString :发送字符串到。 ∙ BarometricPressureWebServer : outputs the values from a barometric pressure nsor as a web page. BarometricPressureWebServer :从网页气压传感器的输出值。 ∙ UDPSendReceiveString : Send and receive text strings via UDP. UDPSendReceiveString :通过UDP发送和接收文本字符串。 ∙ UdpNtpClient : Query a Network Time Protocol (NTP) rver using UDP. UdpNtpClient :查询网络时间协议(NTP8月英文缩写)服务器使用UDP。 ∙ DnsWebClient : DNS and DHCP-bad Web client. DnsWebClient :DNS和DHCP基于Web客户端。 ∙ DhcpChatServer : A simple DHCP Chat Server DhcpChatServer :一个简单的DHCP聊天服务器 ∙ DhcpAddressPrinter : Get an IP address via DHCP and print it out DhcpAddressPrinter :通过DHCP的IP地址,并打印出来 ∙ TwitterClient : A Twitter client with Strings TwitterClient :与弦乐的Twitter客户端 ∙ TelnetClient : A simple Telnet client TelnetClient :一个简单的Telnet客户端 Firmata Libraries firmata图书馆 ∙ Guide to the Standard Firmata Library 指南标准Firmata图书馆 LiquidCrystal Library LiquidCrystal图书馆 ∙ Hello World : displays "hello world!" 你好世界 :显示“Hello World!”and the conds since ret.和秒自复位。 ∙ Blink : control of the block-style cursor. 闪烁 :控制块式游标。 ∙ Cursor : control of the underscore-style cursor. 光标 :下划线式游标控制。 ∙ Display : quickly blank the display without losing what's on it. 显示 :迅速不失它显示空白。 ∙ TextDirection : control which way text flows from the cursor. TextDirection :控制方式文本从光标流动。 ∙ Scroll : scroll text left and right. 滚动 :滚动文本的左边和右边。 ∙ Serial input : accepts rial input, displays it. 串行输入 :接收串行输入,显示它。 ∙ SetCursor : t the cursor position. SetCursor :设置光标位置。 ∙ Autoscroll : shift text right and left. 自动滚屏 :移文本左,右。 SPI Library SPI库 ∙ BarometricPressureSensor : read air pressure and temperature from a nsor using the SPI protocol. BarometricPressureSensor :读空气压力和温度传感器使用SPI协议。 ∙ SPIDigitalPot : control a AD5206 digital potentiometer using the SPI protocol. SPIDigitalPot :控制1 AD5206数字电位器使用SPI协议。 Servo Library伺服图书馆 ∙ Knob : control the shaft of a rvo motor by turning a potentiometer. 旋钮 :控制伺服电机轴转动电位。 ∙ Sweep : sweeps the shaft of a rvo motor back and forth. 扫描 :扫描轴伺服电机来回。 Software Serial Library软件序列库 ∙ Software Serial Example : how to u the Becau sometimes one rial port just isn't enough! 软件序列为例 :如何使用SoftwareSerial的图书馆......因为有时候一个串行端口是不够的! ∙ Two Port Receive : how to work with multiple software rial ports. 两个端口接收 :如何使用多个软件的串行端口。 Stepper Library步进图书馆 ∙ Motor Knob : control a highly accurate stepper motor using a potentiometer. 电机旋钮 :控制高度精确的步进电机使用电位。 Wire Library电线库 ∙ SFRRanger_reader : read a Devantech SRFxx ultra-sonic range finder using I2C communication. SFRRanger_reader :读1 Devantech SRFxx超声波测距仪使用I2C通信。 ∙ digital_potentiometer : control a AD5171 digital pot using the Wire Library. digital_potentiometer :控制1 AD5171数字电位器使用的电线库。 ∙ master reader/slave nder : t up two (or more) arduino boards to share information via a master reader/slave nder configuration. 主读卡器/从发件人 :成立两个(或更多)的Arduino板通过主读者/从发件人配置共享信息。 ∙ master writer/slave reader : allow two (or more) arduino boards to share information using a master writer/slave reader t up. 主作家/从读者 :让两个(或更多)的Arduino板成立主作家/从读者信息共享。 Arduino as ISP Programmer阿尔杜伊诺作为ISP编程 ArduinoISP turns your Arduino into an in-circuit programmer to re-program Atmega chips. ArduinoISP重新编程ATMEGA芯片在电路编程变成你的Arduino。 Uful when you need to re-load the bootloader on an Arduino, if you're going from Arduino to an Atmega on a breadboard , or if you're making your own Arduino-compatible circuit on a breadboard .当您需要重新加载一个Arduino的bootloader,如果你打算从Arduino的面包板ATMEGA ,或者如果你让自己的面包板兼容的Arduino电路 。 More更多 For a huge list of examples from the Arduino community, e the interfacing with hardware page on the playground wiki.一个巨大的Arduino社区的例子列表,看到操场维基页面与硬件的接口 。 Also e the list of old examples .还可 | |
本文发布于:2023-05-21 11:41:12,感谢您对本站的认可!
本文链接:https://www.wtabcd.cn/fanwen/fan/90/117006.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |