Đo độ đục của nước

Project: Đo độ đục của chất lỏng

- Đo độ đục chất lỏng - đo giá trị Analog đưa về

- Truyền dữ liệu đo được lên máy tính

 

Chuẩn bị phần cứng

1 Cảm biến đo độ đục chất lỏng

http://mlab.vn/2292196-cam-bien-do-do-duc-chat-long.html

1 Kit Arduino Uno R3 / UnoVN 01 / DFRduino Uno R3

http://mlab.vn/1697809-uno-vn01-arduino-uno-phien-ban-viet-nam.html

http://mlab.vn/407044-arduino-uno-r3-su-dung-atmega-328p-pu.html

http://mlab.vn/2356225-dfrduino-uno-r3-arduino-uno-r3-compatible.html

 

Kết nối

Cảm biến đo độ đục Arduino
D A0 - Pin Analog A0 của Arduino
+ 5V
- Gnd

 

Code Demo

void setup() {
  Serial.begin(9600); //Baud rate: 9600
}
void loop() {
  int sensorValue = analogRead(A0);// read the input on analog pin 0:
  float voltage = sensorValue * (5.0 / 1023.0); // Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
  Serial.println(voltage); // print out the value you read:
  delay(500);
}

 

Hướng dẫn sử dụng cảm biến đo độ đục chất lỏng
 

Viết đánh giá

Họ và tên:


Đánh giá của bạn: Lưu ý: Không hỗ trợ HTML!

Bình chọn: Dở            Hay

Nhập mã bảo vệ: