火焰传感器介绍
- 认识火焰传感器
火焰传感器(即红外接收三极管)是机器人专门用来搜寻火源的传感器,本传感器对火焰特别灵敏。实物如图:
React JS is a JavaScript library for building user interfaces. It is maintained by Facebook and a community of individual developers and companies.
Latest Version: v16.8.6 (Checked 03/April/2019)
React on Github: https://github.com/facebook/react
React in Chinese (简体中文): https://zh-hans.reactjs.org/
React can be used as a base in the development of single-page or mobile applications, as it is optimal for fetching rapidly changing data that needs to be recorded. However, fetching data is only the beginning of what happens on a web page, which is why complex React applications usually require the use of additional libraries for state management, routing, and interaction with an API.
LM35 是很常用且易用的温度传感器元件,在元器件的应用上也只需要一个LM35元件,只利用一个模拟接口就可以,难点在于算法上的将读取的模拟值转换为实际的温度。
所需的元器件如下:
完成以上的各种实验后,我们对Arduino 的应用也应该有一些认识和了解了,在基本的数字量输入输出和模拟量输入以及PWM 的产生都掌握以后,我们就可以开始进行一些传感器的应用了。
光敏电阻器(photovaristor)又叫光感电阻,是利用半导体的光电效应制成的一种电阻值随入射光的强弱而改变的电阻器;入射光强,电阻减小,入射光弱,电阻增大。光敏电阻器一般用于光的测量、光的控制和光电转换(将光的变化转换为电的变化)。光敏电阻可广泛应用于各种光控电路,如对灯光的控制、调节等场合,也可用于光控开关。
本个实验我们就来开始学习一下模拟I/O 接口的使用,Arduino 有模拟0—模拟5 共计6 个模拟接口,这6 个接口也可以算作为接口功能复用,除模拟接口功能以外,这6 个接口可作为数字接口使用,编号为数字14—数字19,简单了解以后,下面就来开始我们的实验。电位计是大家比较熟悉的典型的模拟值输出元件,本实验就用它来完成。
所需元器件有:
JavaScript, often abbreviated as JS, is a high-level, interpreted programming language that conforms to the ECMAScript specification. JavaScript has curly-bracket syntax, dynamic typing, prototype-based object-orientation, and first-class functions.
Alongside HTML and CSS, JavaScript is one of the core technologies of the World Wide Web. JavaScript enables interactive web pages and is an essential part of web applications. The vast majority of websites use it, and major web browsers have a dedicated JavaScript engine to execute it.
As a multi-paradigm language, JavaScript supports event-driven, functional, and imperative (including object-oriented and prototype-based) programming styles. It has APIs for working with text, arrays, dates, regular expressions, and the DOM, but the language itself does not include any I/O, such as networking, storage, or graphics facilities. It relies upon the host environment in which it is embedded to provide these features.
Initially only implemented client-side in web browsers, JavaScript engines are now embedded in many other types of host software, including server-side in web servers and databases, and in non-web programs such as word processors and PDF software, and in runtime environments that make JavaScript available for writing mobile and desktop applications, including desktop widgets.
JavaScript Docs: https://developer.mozilla.org/en-US/docs/Web/JavaScript
JavaScript Docs in Chinese (简体中文): https://developer.mozilla.org/zh-CN/docs/Web/JavaScript
JavaScript on W3Schools: https://www.w3schools.com/js/
JavaScript by Pluralsight: https://www.javascript.com/
JavaScript Turorial: https://javascript.info/
用Arduino 可以完成的互动作品有很多,最常见也最常用的就是声光展示了,前面一直都是在用LED 小灯在做实验,本个实验就让大家的电路发出声音,能够发出声音的最常见的元器件就是蜂鸣器和喇叭了,两者相比较蜂鸣器更简单和易用所以我们本实验采用蜂鸣器。
以下是要准备的元件:
Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScript.
Web browsers receive HTML documents from a web server or from local storage and render the documents into multimedia web pages. HTML describes the structure of a web page semantically and originally included cues for the appearance of the document.
HTML website: https://www.w3.org/TR/html/
Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language like HTML. CSS is a cornerstone technology of the World Wide Web, alongside HTML and JavaScript.
CSS is designed to enable the separation of presentation and content, including layout, colors, and fonts. This separation can improve content accessibility, provide more flexibility and control in the specification of presentation characteristics, enable multiple web pages to share formatting by specifying the relevant CSS in a separate .css file, and reduce complexity and repetition in the structural content.
Separation of formatting and content also makes it feasible to present the same markup page in different styles for different rendering methods, such as on-screen, in print, by voice (via speech-based browser or screen reader), and on Braille-based tactile devices. CSS also has rules for alternate formatting if the content is accessed on a mobile device.
CSS website: https://www.w3.org/Style/CSS/