Arduino 入門學習筆記4 繼電器實驗
程式
const int relayPin =7; //the "s" of relay module attach to /**********************************************/ void setup() { pinMode(relayPin, OUTPUT); //initialize relay as an output } /***********************************************/ void loop() { digitalWrite(relayPin, HIGH); //Close the relay delay(1000); //wait for 1 second digitalWrite(relayPin, LOW); //disconnect the relay delay(1000); //wait for 1 second } /*************************************************/
電路:
實驗效果
程式執行起來,可以聽到繼電器卡塔卡塔聲音。
相關推薦
Arduino 入門學習筆記4 繼電器實驗
程式 const int relayPin =7; //the "s" of relay module attach to /**********************************************/ void setup() { pinMode(relayP
Arduino 入門學習筆記7 I2C LCD1602液晶顯示實驗 及 超聲波感測器距離檢測
I2C 簡介 I2C匯流排是由Philips公司開發的一種簡單、雙向二線制同步序列匯流排。它只需要兩根線即可在連線於總線上的器件之間傳送資訊。 主器件用於啟動匯流排傳送資料,併產生時鐘以開放傳送的器件,此時任何被定址的器件均被認為是從器件.在總線上主和從、發和收的關係不是恆定的,而取
Arduino 入門學習筆記6 溫度感測器實驗
實驗的溫度感測器使用熱敏電阻;大部分熱敏電阻是負溫度係數(NTC),其電阻隨溫度升高而降低。由於它們的電阻隨溫度變化劇烈變化,所以熱敏電阻是最敏感的溫度感測器。 模擬溫度感測器模組使用NTC熱敏電阻,使用一個內建比較器:LM393,它可以使模組同時輸出數字和模擬訊號。該模組可用於溫度
Arduino 入門學習筆記2 三色LED實驗
電路 程式: /*************************************************** name:RGB LED ****************************************************/ int redPi
Arduino 入門學習筆記1 開發環境及雙色LED實驗
本系列學習教程來自 創樂博智慧學習視訊 Arduino 發展 2005年,Massimo Banzi和David Cuartielles、David Mellis設計 Arduino。取該名稱的原因是Massimo Banzi喜歡去一家名叫Arduino的酒吧,其名稱是1000年
Arduino 入門學習筆記5 按鍵控制鐳射發生器
程式碼 /**********************************************/ const int keyPin = 13; //the "s" of relay module attach to const int laserPin = 7; /*****
Arduino 入門學習筆記3 程式結構和常用函式
Arduino 的程式可以劃分為三個主要部分:結構、變數(變數與常量)、函式。 函式 1、setup() 當Arduino開始的時候被呼叫。用它來初始化變數,設定引腳執行模式,啟動庫檔案等。setup函式只執行一次,每次上電或者被重置時候呼叫。 int buttonPin
前端入門學習筆記4
好吧,我承認今天划水了,原本想今天把CSS有關知識全部過一遍,但是emmmmm,算了,先把今天所學的總結一下吧。 今天沒有進行實地操作,一直在看相關知識點,接著昨天的選擇器開始繼續總結。 偽選擇器: 1.偽類(Pseudo-class) 一個css偽類是以:開頭,新增
誰說菜鳥不會資料分析(入門篇)----- 學習筆記4(資料分析方法)
1、資料分析方法 資料分析作用與對應的分析方法 資料分析作用 基本方法 資料分析方法 現狀分析 對比 對比分析、平均分析、總和評價分析 原因分析
Spring入門學習筆記(4)——JDBC的使用
目錄 Spring JDBC框架概覽 JdbcTemplate類 配置資料來源 資料訪問物件(Data Access Object,DAO) 執行SQL命令 Spring JDBC框架概覽 使用傳統的JDBC連線資料庫,需要編寫不必要的程式碼來處理
完整的Django入門指南學習筆記4
前言 這一章節將會全面介紹 Django 的身份認證系統,我們將實現註冊、登入、登出、密碼重置和密碼修改的整套流程。 同時你還會了解到如何保護某些試圖以防未授權的使用者訪問,以及如何訪問已登入使用者的個人資訊。 在接下來的部分,你會看到一些和身份驗證有關線框圖,將在本教程中實現。之後是一個全新Djang
arduino學習筆記4 讀取模擬器,PWM調節燈光亮度,感熱燈
1.讀取模擬器 int potpin=0;//指定模擬埠A0 int ledpin=13;//指定LED埠 13 int val=0;//宣告臨時變數 void setup() { pinMode(ledpin,OUTPUT);//設定埠13為輸出模式 Serial.begin(96
Robot Operating System (ROS)學習筆記4---語音控制
sla 語音 出現 tput http 學習 process 輸入 ubun 搭建環境:XMWare Ubuntu14.04 ROS(indigo) 轉載自古月居 轉載連接:http://www.guyuehome.com/260 一、語音識別包 1、安裝
AngularJS入門學習筆記一
rect directive 技術分享 attr 兩個 ava 內容 module 大括號 首先聲明: 本博客源自於學習:跟我學AngularJs:AngularJs入門及第一個實例。通過學習,我自己的一些學習筆記。 1.AngularJS的一些基本特性 (1)使用雙大括號
ESP8266學習筆記4:ESP8266的SmartConfig
rtc 訂閱號 new 例程 detail smart ted tracking 不能 今天花了將近一天的時間來研究ESP8266的SmartConfig功能,這個應該算是wifi雲產品的標配。這篇文章先把SmartConfig操作一遍,我還寫了還有一篇文章梳理了物理層
有趣的Ruby-學習筆記4
all 庫文件 scrip 。。 trac module 由於 content pos Ruby塊塊。在我看來就是插入一段可變的函數block_name{ statement1 statement2 .......... }看起來不知道是什麽,只是別急
java入門學習筆記之1(類的定義,代碼的編譯執行)
spa hex nts 自動調用 [] alt vim 進制 技術 這篇文章講解Java代碼的基本執行過程 我們先拋開各種JAVA IDE,開發工具,只使用文本編輯器,以突出最本質的東西。 在Linux環境下,我們編輯一個文件: vim HelloWorld.java
Python學習筆記4 高級特性_20170618
don 全部 one cat rate for 切片 表示 ict # 切片(獲取list / tuple / 字符串 中指定的元素) l = list(range(10)) l[0:3] l[:3] # 0可以省略 l[:] # 全部 l[3:] # 最後的可以省略 l
CCNA學習筆記之一---VLAN實驗組網
網絡技術、交換機、vlan VLAN實驗用的是Cisco Packet Tracer模擬器做的實驗,實驗拓撲如下圖1、Switch1配置如下Switch>en 進入特權模式Switch#conf t
(MYSQL學習筆記4)事務的開啟、提交、回滾
mysql 事務 使用事務要註意以下三點:1、在 MySQL 中只有使用了 Innodb 數據庫引擎的數據庫或表才支持事務。2、事務處理可以用來維護數據庫的完整性,保證成批的 SQL 語句要麽全部執行,要麽全部不執行。3、事務用來管理 insert,update,delete 語句MYSQL 事務處理