1. Trang chủ
  2. » Luận Văn - Báo Cáo

thiết kế hệ thống nhúng hệ thống giám sát nông nghiệp công nghệ iot

33 7 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Nội dung

TIEU LUAN MOI download : skknchat@gmail.com ĐẠI HỌC QUỐC GIA TP.HỒ CHÍ MINH TRƯỜNG ĐẠI HỌC BÁCH KHOA KHOA ĐIỆN – ĐIỆN TỬ BỘ MÔN ĐIỆN TỬ -o0o - THIẾT KẾ HỆ THỐNG NHÚNG HỆ THỐNG GIÁM SÁT NƠNG NGHIỆP CƠNG NGHỆ IOT GVHD: Trần Hồng Qn Nhóm 1: Họ tên SV MSSV Mai Hồng Minh 1914158 Trần Nguyễn Thanh Tú Nguyễn Văn Tuấn Đức 1811326 1811976 TP HỒ CHÍ MINH, THÁNG 11 NĂM 2021 TIEU LUAN MOI download : skknchat@gmail.com Lời cảm ơn GVHD: Trần Hồng Qn LỜI CẢM ƠN Nhóm đồ án chân thành gửi lời cảm ơn đến thầy Trần Hoàng Quân tận tình hướng dẫn, giúp đỡ kiến thức chuyên ngành suốt trình chúng em thực sản phẩm Chúng em thật biết ơn thầy cô giáo khoa Điện giảng dạy chu đáo, cung cấp kiến thức tảng chuyên sâu góp phần quan trọng để chúng em hoàn thành đề tài Do ảnh hưởng đại dịch Covid-19 nên báo cáo sản phẩm mô khơng thể tránh khỏi thiếu sót định Chúng em mong nhận thông cảm góp ý q báu thầy Tp Hồ Chí Minh, ngày 25 tháng 11 năm 2021 Sinh viên Mai Hoàng Minh Trần Nguyễn Thanh Tú Nguyễn Văn Tuấn Đức i TIEU LUAN MOI download : skknchat@gmail.com Hệ thống giám sát nơng nghiệp cơng nghệ IOT GVHD: Trần Hồng Qn TĨM TẮT BÀI TẬP LỚN Bài tập lớn trình bày hệ thống giám sát nông nghiệp công nghệ IOT với chức giám sát, theo dõi nhiệt độ, độ ẩm, độ ẩm đất, cường độ ánh sáng mơi trường thơng qua module cảm biến, sau gửi liệu app điện thoại để người dùng tiện theo dõi Sản phẩm mô hệ thống tập trung nghiên cứu phương thức giao tiếp vi xử lý Atmega328p với cảm biến, ESP8266 Node MCU Thiết kế giao diện app điện thoại Blynk IOT liên kết với phần cứng hoạt động thông qua code Arduino IDE ii thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot TIEU LUAN MOI download : skknchat@gmail.com Hệ thống giám sát nông nghiệp công nghệ IOT GVHD: Trần Hoàng Quân MỤC LỤC GIỚI THIỆU 1.1 Tổng quan .1 1.2 Nhiệm vụ đề tài .2 1.3 Phân chia cơng việc nhóm .2 1.4 Theo dõi tiến trình sản phẩm LÝ THUYẾT 2.1 CHUẨN GIAO TIẾP I2C .3 2.2 CHUẨN GIAO TIẾP UART THIẾT KẾ VÀ THỰC HIỆN PHẦN CỨNG 3.1 Yêu cầu thiết kế 3.2 Phân tích thiết kế 3.2.1 Vi điều khiển Atmega328p .5 3.2.2 Module RF thu phát Wifi ESP8266 NodeMCU Mini D1 3.2.3 Cảm biến cường độ ánh sáng GY-302 BH1750 .8 3.2.4 Cảm biến độ ẩm đất điện dung 3.2.5 Cảm biến nhiệt độ độ ẩm DHT12 10 3.3 Bảng giá thành linh kiện phần cứng 11 YÊU CẦU HỆ THỐNG 11 THIẾT KẾ VÀ THỰC HIỆN PHẦN MỀM 12 4.1 Yêu cầu phần mềm .12 4.2 Giới thiệu phần mềm 12 4.2.1 Phần mềm lập trình Arduino IDE .12 4.2.2 Phần mềm viết ứng dụng Blynk IOT 13 4.3 Thực phần mềm 17 4.3.1 Lưu đồ giải thuật 17 thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot iii thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot TIEU LUAN MOI download : skknchat@gmail.com Hệ thống giám sát nông nghiệp cơng nghệ IOT GVHD: Trần Hồng Qn THIẾT KẾ VÀ THỰC HIỆN PHẦN CỨNG KẾT QUẢ THỰC HIỆN KẾT LUẬN VÀ HƯỚNG PHÁT TRIỂN 8.1 Kết luận 8.2 Hướng phát triển TÀI LIỆU THAM KHẢO 10 PHỤ LỤC 10.1 Video giới thệu sản phẩm 10.2 Mã nguồn chương trình thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot iv thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot TIEU LUAN MOI download : skknchat@gmail.com Hệ thống giám sát nông nghiệp công nghệ IOT GVHD: Trần Hồng Qn DANH SÁCH HÌNH MINH HỌA Hình 2- Sơ đồ chuẩn giao tiếp I2C Hình 2- Sơ đồ giao tiếp chuẩn UART Hình 3- Vi điều khiển Atmega328p .5 Hình 3- Module RF thu phát wifi ESP8266 Hình 3- Cảm biến cường độ ánh sáng GY-302 BH1750 .8 Hình 3- Cảm biến độ ẩm đất điện dung Hình 3- Cảm biến nhiệt độ độ ẩm DHT12 10 Hình 4- Cách thức hoạt động Blynk 14 Hình – Schematic khối ph thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot v thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot TIEU LUAN MOI download : skknchat@gmail.com Hệ thống giám sát nông nghiệp công nghệ IOT GVHD: Trần Hoàng Quân DANH SÁCH BẢNG SỐ LIỆU Bảng 3- Bảng giá thành linh kiện 11 thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot vi thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot TIEU LUAN MOI download : skknchat@gmail.com Hệ thống giám sát nơng nghiệp cơng nghệ IOT GVHD: Trần Hồng Quân GIỚI THIỆU 1.1 Tổng quan Nông nghiệp vấn đề trọng yếu quốc gia việc bảo đảm an ninh lương thực, hai ngành sản xuất vật chất quan trọng kinh tế Là khu vực sản xuất chủ yếu, đảm bảo đời sống cho xã hội, thị trường rộng lớn cung cấp nguyên liệu tiêu thụ sản phẩm kinh tế tích lũy cho cơng nghiệp Việt Nam nước sản xuất chủ yếu nông nghiệp với 66,9% dân số nước tập trung sống vùng nông thôn[1], lao động nông nghiệp chiếm tới 42% lao động toàn xã hội[2] Ngày nay, nước ta hướng tới xây dựng công nghiệp phát triển, điều mang lại nhiều lợi ích cho đất nước kèm theo nhiều hệ lụy, đặc biệt ô nhiễm môi trường, mảng chịu thiệt hại lớn từ vấn đề ngành nơng nghiệp Bên cạnh đó, nhiều năm qua, sản xuất nơng nghiệp Việt Nam gặp nhiều khó khăn tượng thời tiết cực đoan ngày diễn biến phức tạp ảnh hưởng biến đổi khí hậu tồn cầu, làm ảnh hưởng to lớn đến suất chất lượng sản phẩm từ nơng nghiệp Cùng với đó, việc chuyển dịch cấu kinh tế theo hướng công nghiệp, dịch vụ, làm giảm đáng kể nhân lực nông nghiệp, theo nhiều dự báo số lượng tiếp tục gia tăng năm tới, điều đưa tới toán cho việc giải vấn đề nhân lực ngành nơng nghiệp.[3] Chính vậy, việc tìm kiếm giải pháp để ổn định nâng cao chất lượng sản phẩm, suất thu hoạch trở thành ưu tiên hàng đầu nhà nước năm qua Do đó, ứng dụng cơng nghệ đưa vào việc chăm sóc, thu hoạch nơng nghiệp để khắc phục vấn đề thiên tai, môi trường, tiết kiệm nhân lực, đồng thời gia tăng suất trồng, đơn giản hóa việc quản lý Một ứng dụng công nghệ bật đưa vào nông nghiệp năm gần Internet of thing ( viết tắt IOT) đem lại thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot TIEU LUAN MOI download : skknchat@gmail.com Hệ thống giám sát nông nghiệp công nghệ IOT GVHD: Trần Hoàng Quân nhiều kết thành công, áp dụng phổ biến nhiều diện tích canh tác nơng nghiệp, chúng em chọn đề tài “ hệ thống giám sát nông nghiệp cơng nghệ IOT” nhằm có hiểu biết thêm tác động công nghệ tới khả phát triển trồng, quản lý người điều khiển, bên cạnh nghiên cứu thêm ứng dụng công nghệ điện tử đưa vào 1.2 Nhiệm vụ đề tài Mục tiêu đề tài xây dựng hệ thống IoT nông nghiệp có khả giám sát nhiệt độ, độ ẩm, độ ẩm đất, cường độ ánh sáng (thông qua cảm biến) Hệ thống cho phép thực thao tác giám sát – điều khiển trang web thông qua WiFi ứng dụng Android 1.3 Phân chia cơng việc nhóm Thành viên Mai Hồng Minh Trần Nguyễn Thanh Tú Nguyễn Văn Tuấn Đức Nhiệm vụ Nhóm trưởng, lên kế hoạch, code chương trình, xây dựng giải thuật, thiết kế phần cứng, thi công mạch, kiểm tra mạch Kiểm tra mạch, xây dựng giải thuật, lên ý tưởng viết báo cáo Kiểm tra mạch, xây dựng giải thuật, lên ý tưởng viết báo cáo 1.4Theo dõi tiến trình sản phẩm Week 3-4-5 1.System requirement x 2.System specification x 3.Design hardware part 3.1 Schemactic 3.2 PCB 6-7 8-9 10-11 12-13 x x 13-14 X X x 4.Develop software part thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot TIEU LUAN MOI download : skknchat@gmail.com Hệ thống giám sát nông nghiệp công nghệ IOT 5.Viết giải thuật GVHD: Trần Hoàng Quân X 4.2 Viết code x x Thi công kiểm tra x x x LÝ THUYẾT 2.1 CHUẨN GIAO TIẾP I2C I2C có tên đầy đủ Intergrated-Circuit, loại bus nối tiếp phát triển hãng sản xuất linh kiện điện tử Philips Do có tính vượt trội đơn giản, I2C chuẩn hóa sử dụng rộng rãi module truyền thơng giao tiếp vi mạch tích hợp ngày Hình 2- Sơ đồ chuẩn giao tiếp I2C CẤU TẠO VÀ NGUYÊN LÝ HOẠT ĐỘNG: Giao tiếp I2C sử dụng dây để truyền liệu thiết bị:  SDA (Serial Data): đường truyền liệu theo hướng  SCL (Serial Clock): đường truyền tín hiệu xung nhịp I2C giao thức truyền thông nối tiếp, liệu truyền bit dọc theo đường (đường SDA) thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot TIEU LUAN MOI download : skknchat@gmail.com Hệ thống giám sát nơng nghiệp cơng nghệ IOT GVHD: Trần Hồng Qn Installation: Hoạt động nhà kính => yêu cầu linh kiện hàn xong phải cố định, bo mạch chịu thời tiết ẩm ướt, tiếp xúc ánh nắng liên tục Certification: Vật liệu chọn (bảng mạch, meca, dây nối,… ) đảm bảo an toàn điện thân thiện môi trường THIẾT KẾ VÀ THỰC HIỆN PHẦN MỀM 4.1 Yêu cầu phần mềm Các yêu cầu phần mềm để hệ thống vận hành với chức năng: lấy liệu từ cảm biến hiển thị lên hình app điện thoại 4.2 Giới thiệu phần mềm 4.2.1 Phần mềm lập trình Arduino IDE Arduino IDE phần mềm mã nguồn mở chủ yếu sử dụng để viết biên dịch mã vào module Arduino Đây phần mềm Arduino thức, giúp cho việc biên dịch mã trở nên dễ dàng mà người bình thường khơng có kiến thức kỹ thuật làm Nó có phiên cho hệ điều hành MAC, Windows, Linux chạy tảng Java kèm với chức lệnh có sẵn đóng vai trò quan trọng để gỡ lỗi, chỉnh sửa biên dịch mã mơi trường Có nhiều module Arduino Arduino Uno, Arduino Mega, Arduino Leonardo, Arduino Micro nhiều module khác Mỗi module chứa vi điều khiển bo mạch lập trình chấp nhận thơng tin dạng mã Mã chính, cịn gọi sketch, tạo tảng IDE tạo file Hex, sau chuyển tải lên điều khiển bo Môi trường IDE chủ yếu chứa hai phần bản: Trình chỉnh sửa Trình biên dịch, phần đầu sử dụng để viết mã yêu cầu phần sau sử dụng để biên dịch tải mã lên module Arduino Môi trường hỗ trợ ngôn ngữ C C ++ thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot 12 thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot TIEU LUAN MOI download : skknchat@gmail.com Hệ thống giám sát nông nghiệp công nghệ IOT GVHD: Trần Hoàng Quân Khi người dùng viết mã biên dịch, IDE tạo file Hex cho mã File Hex file thập phân Hexa Arduino hiểu sau gửi đến bo mạch cáp USB Mỗi bo Arduino tích hợp vi điều khiển, vi điều khiển nhận file hex chạy theo mã viết 4.2.2 Phần mềm viết ứng dụng Blynk IOT Giới thiệu App Blynk IOT:         Cung cấp API & giao diện người dùng tương tự cho tất thiết bị phần cứng hỗ trợ Kết nối với server cách sử dụng: o Wifi o Bluetooth BLE o Ethernet o USB (Serial) o GSM o … Các tiện ích giao diện nhà cung cấp dễ sử dụng Thao tác kéo thả trực tiếp giao diện mà không cần viết mã Dễ dàng tích hợp thêm chức cách sử dụng cổng kết nối ảo tích hợp blynk app Theo dõi lịch sử liệu Thông tin liên lạc từ thiết bị đến thiết bị Widget Gửi email, tweet, thông báo realtime, v.v thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot 13 thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot TIEU LUAN MOI download : skknchat@gmail.com Hệ thống giám sát nông nghiệp công nghệ IOT GVHD: Trần Hồng Qn Hình 4- Cách thức hoạt động Blynk Hướng dẫn sử dụng App Blynk IOT: Bước 1: Truy cập vào địa https://blynk.io/, sau tạo tài khoản thơng qua gmail Bước 2: Sau đăng nhập, tạo templates cách chọn vào “New Template” Bước 3: Sau tạo thành cơng, hình hiển thị template Bước 4: Chọn mục “Datastreams”, sau chọn “New Datastream” để tạo thơng số cho thiết bị hiển thị app thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot 14 thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot TIEU LUAN MOI download : skknchat@gmail.com Hệ thống giám sát nơng nghiệp cơng nghệ IOT GVHD: Trần Hồng Quân Bước 5: Sau tạo thành công Datastream, chọn mục “Web Dashboard” để thiết kế giao diện cách kéo thả mục có sẵn (Cài đặt mục theo Datastream tạo) Bước 6: Chọn mục Info, chép phần “FIRMWARE CONFIGURATION” vào đầu phần code Arduino IDE thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot 15 thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot TIEU LUAN MOI download : skknchat@gmail.com Hệ thống giám sát nông nghiệp công nghệ IOT GVHD: Trần Hoàng Quân Bước 7: Tải app Blynk IOT cho điện thoại, sau đăng nhập gmail đăng ký web blynk.io Bước 8: Chọn mục “Add new device”, sau chọn “Connect to Wi-Fi”  “Ready” (nhớ bật định vị trước nhấn), App quét mạng wifi vi xử lý, sau chọn để kết nối Bước 9: Sau kết nối với mạng wifi vi xử lý, tiếp tục kết nối với mạng wifi network cho vi xử lý Bước 10: Sau hoàn thành tất bước, hình giao diện thiết kế app hiển thị Chọn để kéo thả thiết bị có sẵn (cài đặt theo datastream tạo web) thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot 16 thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot TIEU LUAN MOI download : skknchat@gmail.com Hệ thống giám sát nông nghiệp công nghệ IOT Bước 11: Sau thiết kế giao diện app, chọn GVHD: Trần Hồng Qn để ra, app tự động chạy 4.3 Thực phần mềm 4.3.1 Lưu đồ giả i thuậ t Atmega 328p: thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot 17 thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot TIEU LUAN MOI download : skknchat@gmail.com Hệ thống giám sát nông nghiệp công nghệ IOT GVHD: Trần Hoàng Quân Esp8266 App: thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot 18 thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot TIEU LUAN MOI download : skknchat@gmail.com Hệ thống giám sát nông nghiệp công nghệ IOT GVHD: Trần Hoàng Quân THIẾT KẾ VÀ THỰC HIỆN PHẦN CỨNG Hình -1: Schematic sản phẩm thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot 19 thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot TIEU LUAN MOI download : skknchat@gmail.com Hệ thống giám sát nông nghiệp công nghệ IOT GVHD: Trần Hoàng Quân KẾT QUẢ THỰC HIỆN thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot 20 thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot TIEU LUAN MOI download : skknchat@gmail.com Hệ thống giám sát nơng nghiệp cơng nghệ IOT GVHD: Trần Hồng Qn thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot 21 thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot TIEU LUAN MOI download : skknchat@gmail.com Hệ thống giám sát nơng nghiệp cơng nghệ IOT GVHD: Trần Hồng Quân KẾT LUẬN VÀ HƯỚNG PHÁT TRIỂN 8.1 Kết luận Ưu điểm: Sản phẩm có ưu điểm thời gian thực thi nhanh, xác, độ ổn định cao, chi phí vừa phải Sản phẩm gọn nhẹ dễ thi cơng lắp đặt Nhược điểm: Chưa có nhiều chức để chọn Thuật tốn chưa tối ưu 8.2 Hướng phát triển Để sản phẩm đến tay người dùng, nhóm có định hướng sau: - Thêm rơ-le để bật máy bơm đất không đủ độ ẩm, bật đèn dây tóc để tăng nhiệt độ cho nhà kính - Sử dụng nguồn 220V trực tiếp để tránh tháo thay pin nhiều lần - Thay cảm biến có chất lượng tốt để đảm bảo nhu cầu người dùng TÀI LIỆU THAM KHẢO Trang web: http://arduino.vn/ Trang web: https://www.instructables.com/ Sách Embedded C Programming and the ATMEL AVR 2nd Edition Sách Introduction to Embedded Systems Using ANSI C and the Arduino Development Environment by David Russell, Mitchell Thornton (z-lib.org) 10.PHỤ LỤC 10.1 Video giới thệu sản phẩm Project_HTN 10.2 Mã nguồn chương trình - Code Atmega 328p #include #include thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot 22 thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot TIEU LUAN MOI download : skknchat@gmail.com Hệ thống giám sát nông nghiệp công nghệ IOT GVHD: Trần Hoàng Quân #include #include "MoiSensor.h" #include "HumTemSensor.h" #include "LuxSensor.h" #include #include const byte RX = 2; const byte TX = 3; SoftwareSerial mySerial = SoftwareSerial (RX, TX); void setup() { Serial.begin(9600); mySerial.begin(9600); } void loop() { MoiSensor(); HumTemSensor(); LuxSensor(); StaticJsonDocument doc; JsonObject data = doc.to(); thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot 23 thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot TIEU LUAN MOI download : skknchat@gmail.com Hệ thống giám sát nông nghiệp công nghệ IOT GVHD: Trần Hoàng Quân data["ND"] = nhietdo; data["DA"] = amkhi; data["DAD"] = amdat; data["AS"] = lux; serializeJson(data, mySerial); doc.clear(); delay(500); } - Code Esp8266 #include #include #include #include BlynkTimer timer; #define BLYNK_TEMPLATE_ID "TMPLrKy2uL9D" #define BLYNK_DEVICE_NAME "Test" char auth[] = "v4SVd2nq0_g8TOXDJTqKi6g0hlUzv6t0"; char ssid[] = "Viettel_Bay Cham"; char pass[] = "1234567890"; thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot 24 thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot TIEU LUAN MOI download : skknchat@gmail.com Hệ thống giám sát nông nghiệp công nghệ IOT GVHD: Trần Hoàng Quân const byte RX = D6; const byte TX = D5; float nhietdo; float amkhi; float amdat; float lux; SoftwareSerial mySerial = SoftwareSerial(RX,TX); void setup() { Serial.begin(9600); mySerial.begin(9600); while (!Serial) continue; Blynk.begin(auth, ssid, pass, "blynk.cloud", 80); timer.setInterval(1000L, json); } void loop() { Blynk.run(); timer.run(); } void json() thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot 25 thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot thiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iotthiet.ke.he.thong.nhung.he.thong.giam.sat.nong.nghiep.cong.nghe.iot

Ngày đăng: 09/01/2024, 02:15

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w