[Diao Ye learns programming] Arduino hands-on (212) --- 9 in 1 expansion board to complete Arduino's 10 types of experiments, photoresistor brightness sensor experiment

insert image description here

The reference to 37 sensors and modules has been widely circulated on the Internet. In fact, there must be more than 37 sensor modules compatible with Arduino. In view of the fact that I have accumulated some sensors and modules on hand, according to the concept of practice (hands-on try), for the purpose of learning and communication, I am going to do experiments one by one here, and will record them regardless of whether they are successful or not. It is a difficult problem, and I hope to be able to throw bricks and spark jade.

[Arduino] 168 kinds of sensor module series experiment (data code + simulation programming + graphics programming)
experiment 212: 9 in 1 multi-function expansion board DHT1 device temperature and humidity LM3 temperature 5 buzzer 1 compatible with UNO

insert image description here

Take the combination of "Arduino program code" + "Mind + graphics programming" + "Linkboy simulation programming"

Complement each other, lay a solid foundation, and promote understanding

insert image description here

Experiment catalog (Arduino hands-on)
1. LED experiment
01 Blink: D13 blue LED blinks
02 Blink2: D12, D13 red and blue LEDs blink alternately
03 Blink3: Simulate flashing alarm light
04 Breath_LED: D9 full-color LED simulates red breathing light
2. Button experiment
05 Button: D2 button controls D13 blue LED
06 Button_Lock: D3 button controls D13 blue LED self-locking experiment
3. Potentiometer experiment
07 RS232_AD: serial port reads A0 potentiometer to collect value (rotation angle 270° output 0 -3.3V/5V voltage signal potentiometer resistance value 10K)
08 Rotation_LED: A0 potentiometer controls D11 full-color LED blue terminal brightness
09 RC_Motor: A0 potentiometer controls the steering gear at the output port of D7 to control its rotation angle (the steering gear needs to be automatically Arduino needs external power supply)
4. RGB full-color LED experiment
10 LED_RGB_Text: full-color LED basic color change
11 LED_RGB: full-color LED rainbow change
5. Infrared sensor D6 experiment (infrared remote control needs to be prepared by yourself)
12 IRrelay: press infrared remote control Any key of the device can control the D13 LED switch (control distance 1-8 meters, frequency 38KHz, compatible with most infrared remote controls on the market)
13 IRrecord: The serial port displays the read infrared remote control code
6. Temperature sensor experiment
14 LM35_RS232AD: The serial port
displays the temperature read by the LM35 temperature sensor on the A2 port (it can test the indoor and outdoor temperature, the range is -50-150°C, and the sensitivity is good).
Taken temperature and humidity data (temperature measurement range 0-50°C, humidity range 20%-90%PH)
8. Brightness sensor experiment
16 Light Sensor: serial port displays the value collected by the photoresistor of port A1
17 Light_LED: control of the photoresistor of port A1 D13 LED switch (sensitive to light, suitable for teaching experiments and civilian equipment)
9. Buzzer experiment
18 Buzzer: D5 port passive buzzer to simulate an ambulance siren (can make simple music sounds, music needs to be programmed)
10 , Extended experiment
19 Analog ultrasonic ranging sensor (detection type I, IIC/I2C interface)
20 Bus DS18B20 temperature sensor (numeric type, connected to the digital D7 interface of the expansion board)
21 TM1637 four-digit digital tube (digital tube and dot matrix type, connected to Expansion board digital D7/D8 interface)
22 GY-BMP280-3.3 Atmospheric pressure altimeter sensor module (numeric type, IIC/I2C interface)
23 GY-NEO-6MV2 new flight control GPS satellite signal receiving module (numeric type, TTL interface)
24 5V low-level trigger single-channel relay module (executive type, digital D7 interface)
25 4-wire sound sensor module with electret microphone (trigger type, digital D7 interface)
26 BH1750FVI digital light intensity module light sensor (numeric type, IIC/ I2C interface)
27 Open source DFPlayer Mini TF card MP3 player module (output actuator type D7/D8 digital interface)
28 LCD1602 LCD screen module (output display type, IIC/I2C interface)
29 Human body infrared pyroelectric motion sensor module (trigger type, digital D7 interface)
30 DS1307 clock module Tiny RTC I2C module (detection sensor type, IIC/I2C interface)
31 compatible HC-06 slave Bluetooth module (communication and storage type, TTL interface)

insert image description here

8. Brightness sensor experiment
16 Light Sensor: The serial port displays the value collected by the photoresistor of port A1
17 Light_LED: The photoresistor of port A1 controls the switch of D13 LED (sensitive to light, suitable for teaching experiments and civilian equipment)

16 Light Sensor: The serial port displays the value collected by the A1 port photoresistor.
Arduino experiment open source code

/*
Eagler8实验程序列表
亮度传感器实验
16 Light Sensor:串口显示 A1 口光敏电阻采集的数值
*/

void setup()
{
    
    
  Serial.begin(9600);
}
void loop()
{
    
    
      int val;
      val=analogRead(1);   
      Serial.println(val,DEC);   
      delay(100);
}

Experimental serial port plotter return status

insert image description here
Experimental open source graphics programming (Mind+, programming while learning)
insert image description here

Experimental serial port return

insert image description here
Experimental open source simulation programming (Linkboy V5.33)

insert image description here

17 Light_LED: A1 port photoresistor controls D13 LED switch
Arduino experiment open source code

/*
Eagler8实验程序列表
17 Light_LED:A1 口光敏电阻控制 D13 LED 开关(感光比较灵敏,适合教学实验及民用设备)
*/

int sensorPin = 1;   
int ledPin = 13;      
int sensorValue = 0;  

void setup()
{
    
    
    pinMode(ledPin, OUTPUT);   
}

void loop()
{
    
    
    sensorValue = analogRead(sensorPin);
    if(sensorValue < 700)
    {
    
    
        digitalWrite(ledPin, HIGH);   
    }
    else digitalWrite(ledPin, LOW);
}

Experimental open source graphics programming (Mind+, programming while learning)

insert image description here
insert image description here
insert image description here

insert image description here

Guess you like

Origin blog.csdn.net/weixin_41659040/article/details/132458365