實驗參考網址
CH3
CH4
CH5
http://pub.tust.edu.tw/mechanic/mclab/public_html/_private/electronics/diode/circuit.htm
阿哲的小天地
電子學實驗
DHT12 溫度.濕度感測器
https://yhhuang1966.blogspot.com/2015/08/arduino-dht11.html
https://github.com/Bobadas/DHT12_library_Arduino
/*
* 2018.06.12
* 按照DHP11接角位
* 左1 3V
* 左2 D0
* 左3 空
* 左4 GND
*/
#include "DHT.h"
#define DHTPIN D0
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);
void setup() {
Serial.begin(9600);
Serial.println("DHT11 test!");
dht.begin();
}
void loop() {
delay(1000);
float h = dht.readHumidity();
float t = dht.readTemperature();
float f = dht.readTemperature(true);
if (isnan(h) || isnan(t) || isnan(f)) {
Serial.println("Failed to read from DHT sensor!");
return;
}
Serial.print("濕度: ");
Serial.print(h);
Serial.print("%\t");
Serial.print("溫度: ");
Serial.print(t);
Serial.print("*C\t");
Serial.println(" ");
}
https://github.com/Bobadas/DHT12_library_Arduino
/*
* 2018.06.12
* 按照DHP11接角位
* 左1 3V
* 左2 D0
* 左3 空
* 左4 GND
*/
#include "DHT.h"
#define DHTPIN D0
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);
void setup() {
Serial.begin(9600);
Serial.println("DHT11 test!");
dht.begin();
}
void loop() {
delay(1000);
float h = dht.readHumidity();
float t = dht.readTemperature();
float f = dht.readTemperature(true);
if (isnan(h) || isnan(t) || isnan(f)) {
Serial.println("Failed to read from DHT sensor!");
return;
}
Serial.print("濕度: ");
Serial.print(h);
Serial.print("%\t");
Serial.print("溫度: ");
Serial.print(t);
Serial.print("*C\t");
Serial.println(" ");
}
Blynk 期末
http://wyj-learning.blogspot.tw/2018/01/arduino-04-blynk-arduino.html
https://dooit.com.tw/tutorials/nodemcu%E6%90%96%E6%8E%A7%E9%A4%B5%E9%AD%9A%E7%A5%9E%E5%99%A8/
https://examples.blynk.cc/?board=NodeMCU&shield=ESP8266%20WiFi&example=GettingStarted%2FServo
https://www.youtube.com/watch?v=4zbGkqEK70k
http://yhhuang1966.blogspot.com/2016/08/blynk-displays.html
http://docs.blynk.cc/#widgets-displays-labeled-value
https://www.taiwansensor.com.tw/shop/sensors/env/tprh/dht12-%E6%95%B8%E5%AD%97%E6%BA%AB%E6%BF%95%E5%BA%A6%E6%84%9F%E6%B8%AC%E5%99%A8%E6%A8%A1%E7%B5%84-%E5%96%AE%E7%B8%BD%E7%B7%9A-%E5%92%8C-i2c-%E9%80%9A%E4%BF%A1-dht11%E5%8D%87%E7%B4%9A%E7%89%88/
草稿碼 , 匯入程式庫 , 管理程式庫 , 搜索Blynk , 選擇0.5.3
https://community.blynk.cc/t/blynk-virtual-pin-blynk-write/7001/3
blynk 虛擬腳位
ef13a7aefb074f5e98833f3ac24e82 e3 text
ESP_0016F3
https://dooit.com.tw/tutorials/nodemcu%E6%90%96%E6%8E%A7%E9%A4%B5%E9%AD%9A%E7%A5%9E%E5%99%A8/
https://examples.blynk.cc/?board=NodeMCU&shield=ESP8266%20WiFi&example=GettingStarted%2FServo
https://www.youtube.com/watch?v=4zbGkqEK70k
http://yhhuang1966.blogspot.com/2016/08/blynk-displays.html
http://docs.blynk.cc/#widgets-displays-labeled-value
https://www.taiwansensor.com.tw/shop/sensors/env/tprh/dht12-%E6%95%B8%E5%AD%97%E6%BA%AB%E6%BF%95%E5%BA%A6%E6%84%9F%E6%B8%AC%E5%99%A8%E6%A8%A1%E7%B5%84-%E5%96%AE%E7%B8%BD%E7%B7%9A-%E5%92%8C-i2c-%E9%80%9A%E4%BF%A1-dht11%E5%8D%87%E7%B4%9A%E7%89%88/
草稿碼 , 匯入程式庫 , 管理程式庫 , 搜索Blynk , 選擇0.5.3
https://community.blynk.cc/t/blynk-virtual-pin-blynk-write/7001/3
blynk 虛擬腳位
ef13a7aefb074f5e98833f3ac24e82
ESP_0016F3
烙鐵的保養 && 焊錫使用
http://subig1957.pixnet.net/blog/post/17151058-%E7%84%8A%E9%8C%AB%E8%88%87%E5%8E%BB%E9%8C%AB%E6%BC%AB%E8%AB%87
https://www.mobile01.com/topicdetail.php?f=168&t=5053888
https://www.strongpilab.com/iron-solder-desolder-skill/
https://www.mobile01.com/topicdetail.php?f=116&t=5157858
http://musicalsound.com.tw/diy/solder.htm
http://www.hitonaudio.com/forum_oneissue.php?mi=366&page=3
http://subig1957.pixnet.net/blog/post/17151058-%E7%84%8A%E9%8C%AB%E8%88%87%E5%8E%BB%E9%8C%AB%E6%BC%AB%E8%AB%87
錫聲 && 音響電容
https://www.mobile01.com/topicdetail.php?f=168&t=5053888
https://www.strongpilab.com/iron-solder-desolder-skill/
https://www.mobile01.com/topicdetail.php?f=116&t=5157858
http://musicalsound.com.tw/diy/solder.htm
http://www.hitonaudio.com/forum_oneissue.php?mi=366&page=3
http://subig1957.pixnet.net/blog/post/17151058-%E7%84%8A%E9%8C%AB%E8%88%87%E5%8E%BB%E9%8C%AB%E6%BC%AB%E8%AB%87
錫聲 && 音響電容
SG90 馬達
#include <Servo.h>
Servo myservo;
void setup()
{
myservo.attach(D7,500,2400);
}
void loop()
{
for(int i = 0; i <= 180; i+=1){
myservo.write(i);
delay(15);
}
for(int i = 180; i >= 0; i-=1){
myservo.write(i);
delay(15);
}
}
//紅接UV
//橘接D7
//咖啡接GND
Servo myservo;
void setup()
{
myservo.attach(D7,500,2400);
}
void loop()
{
for(int i = 0; i <= 180; i+=1){
myservo.write(i);
delay(15);
}
for(int i = 180; i >= 0; i-=1){
myservo.write(i);
delay(15);
}
}
//紅接UV
//橘接D7
//咖啡接GND
光敏電阻 && 可變電阻
const byte potpin = A0;
int val; //接收類比輸入值的變數,類行為整數
//可變電阻輸出範圍值 0~1023
void setup() {
Serial.begin(9600); // 以9600bps速率初始化序列錐
}
void loop() {
val = analogRead(potpin);
Serial.println(val);
delay(500);
}
http://mcu-tw.blogspot.com/2013/06/arduino-lab-5-led.html
http://coopermaa2nd.blogspot.tw/2010/12/arduino-lab4.html
int val; //接收類比輸入值的變數,類行為整數
//可變電阻輸出範圍值 0~1023
void setup() {
Serial.begin(9600); // 以9600bps速率初始化序列錐
}
void loop() {
val = analogRead(potpin);
Serial.println(val);
delay(500);
}
http://mcu-tw.blogspot.com/2013/06/arduino-lab-5-led.html
http://coopermaa2nd.blogspot.tw/2010/12/arduino-lab4.html
音樂音量led顯示
// 先用Arduino做 ,之後再找晶片
// https://item.jd.com/24364670781.html
//https://www.banggood.com/With-Housing-DIY-Music-Spectrum-LED-Flash-Kit-DIY-Amplifier-Speaker-Kit-p-986043.html?utm_source=youtube&utm_medium=CreativeChannel&utm_campaign=Nov&utm_content=huangwenjie&cur_warehouse=CN
const byte potPin = A0;
const byte pins[6] = {D3, D2, D4, D5, D6, D0 };
int val;
int k;
void setup() {
Serial.begin(9600);
pinMode(D0, OUTPUT);
pinMode(D2, OUTPUT);
pinMode(D3, OUTPUT);
pinMode(D4, OUTPUT);
pinMode(D5, OUTPUT);
pinMode(D6, OUTPUT);
for (int thisPin = 0; thisPin < 6; thisPin++) {
pinMode(pins[thisPin], OUTPUT); }
}
void loop() {
val = analogRead(potPin);
Serial.print("val=");
Serial.println(val);
k = val/147; // 1024/7 = 147
Serial.print("val/147=");
Serial.println(k);
for (int thisPin = 0; thisPin < k; thisPin++) {
digitalWrite(pins[thisPin], HIGH); }
delay (100);
for (int thisPin = 0; thisPin < k; thisPin++) {
digitalWrite(pins[thisPin], LOW); }
}
// https://item.jd.com/24364670781.html
//https://www.banggood.com/With-Housing-DIY-Music-Spectrum-LED-Flash-Kit-DIY-Amplifier-Speaker-Kit-p-986043.html?utm_source=youtube&utm_medium=CreativeChannel&utm_campaign=Nov&utm_content=huangwenjie&cur_warehouse=CN
const byte potPin = A0;
const byte pins[6] = {D3, D2, D4, D5, D6, D0 };
int val;
int k;
void setup() {
Serial.begin(9600);
pinMode(D0, OUTPUT);
pinMode(D2, OUTPUT);
pinMode(D3, OUTPUT);
pinMode(D4, OUTPUT);
pinMode(D5, OUTPUT);
pinMode(D6, OUTPUT);
for (int thisPin = 0; thisPin < 6; thisPin++) {
pinMode(pins[thisPin], OUTPUT); }
}
void loop() {
val = analogRead(potPin);
Serial.print("val=");
Serial.println(val);
k = val/147; // 1024/7 = 147
Serial.print("val/147=");
Serial.println(k);
for (int thisPin = 0; thisPin < k; thisPin++) {
digitalWrite(pins[thisPin], HIGH); }
delay (100);
for (int thisPin = 0; thisPin < k; thisPin++) {
digitalWrite(pins[thisPin], LOW); }
}
訂閱:
文章 (Atom)
-
https://github.com/spacehuhn/esp8266_deauther/wiki http://arbu00.blogspot.com/2015/11/build-btsmartcar-with-3dp-arduino-hwsw.html
-
http://pizgchen.blogspot.com/2017/04/nodemcu-lab0.html