-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c9f0773
commit 0e85ccc
Showing
22 changed files
with
3,055 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<div align="center"> | ||
<h1> Flowerpot交互花盆</h1> | ||
<img src="https://img.shields.io/github/license/JasonYANG170/Flowerpot?style=for-the-badge"> | ||
<img src="https://img.shields.io/github/commit-activity/w/JasonYANG170/Flowerpot?style=for-the-badge"> | ||
<img src="https://img.shields.io/github/languages/count/JasonYANG170/Flowerpot?logo=cplusplus&style=for-the-badge"> | ||
<br> | ||
<a href="https://discord.com/invite/az3ceRmgVe"><img alt="Discord" src="https://img.shields.io/discord/978108215499816980?style=social&logo=discord&label=echosec"></a> | ||
<br> | ||
<img src="https://github.com/JasonYANG170/Flowerpot/assets/39414350/fb4f4e7e-ed8a-4745-9fe7-4c52a4537b50"> | ||
<br> | ||
这是一项基于C++语言,以ESP8266为核心处理器开发的Arduino物联网项目 | ||
|
||
<br> | ||
本项目开源版本为Core版本,请遵守GPL2.0开源许可协议 | ||
</div> | ||
|
||
## 演示视频 | ||
[哔哩哔哩](https://www.bilibili.com/video/BV1LCTFeuEKt/) | ||
## 本项目接入万物互联IOT | ||
电脑端:https://github.com/JasonYANG170/IOTConnect-PC | ||
|
||
|
||
手机端:https://github.com/JasonYANG170/IOTConnect-Android | ||
|
||
|
||
Web端:https://github.com/JasonYANG170/IOTConnect-Web | ||
|
||
## 功能 | ||
- [x] 拟人表情 | ||
- [x] ChatGPT文字交互模型 | ||
- [x] OpenCV深度视觉识别算法 | ||
- [x] 客户端远控Android/Windows | ||
- [x] 土壤加温 | ||
- [x] 无线充电 | ||
- [x] 蓄电池充电 | ||
- [x] 电量显示 | ||
- [x] 自动浇水 | ||
- [x] 支持mqtt服务器收发 | ||
- [x] 支持OTA技术 | ||
- [ ] 每日报告 | ||
- [ ] 模块插件 | ||
## 迭代说明 | ||
**2023年3月**,打造了我们第一个产品Flowerpot节水净水花盆,该花盆主要面向于年轻用户群体,搭载了我们首个特点“拟人表情显示技术”,通过采集植物生长数据结合云端AI模型生成拟人表情。同时我们购入3D打印设备制作初代产品的外壳。 | ||
|
||
**5月**,我们认为初代产品存在电路结构混乱,外观设计笨重,美观度较差等问题,于是我们重新对其外观进行设计,以及使用PCB设计软件完成了我们产品的PCB集成电路布局。 | ||
|
||
**7月**,我们通过个人渠道发布了产品问卷调查,调查反馈市场兴趣较大,于是我们对产品的源码进行重构,并为初代产品源码颁发GPL2.0开源许可协议,同时在GitHub开源平台开放初代产品源码。 | ||
|
||
**10月**,我们对该产品迭代升级,新增特点MQTT云端控制技术及OTA功能,为我们的物联网数字生活类产品打造了分别基于C++、Kotlin的Windows、Android客户端软件,用户可在手机或电脑远程控制我们的产品以及通过云端完成软件升级。 | ||
|
||
**11月**,我们再次对产品迭代,改名为Flowerpot交互花盆,并添加了AI交互大模型及深度视觉识别学习算法特点,用户可以通过客户端软件连接AI交互大模型实现与植物的拟人交互,研究认为有助于缓解用户压力。同时用户可以通过拍摄植物生长过程的图片并上传给电脑客户端,基于深度视觉识别学习算法可以得出植物未来生长趋势,生长速率等信息。 | ||
|
||
**2024年1月**,通过用户使用反馈,认为原有花盆结构存在烂根,排水能力较弱问题,我们对于花盆整体结构重新升级,并引入新的特点“模块化设计”思路,用户可以根据喜好选择搭载模块化部件,可以添加蓄电池模块,太阳能模块,LED红蓝光模块,自动浇水模块,笔筒组件等等。 | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.4.33403.182 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "智能节水花盆", "智能节水花盆\智能节水花盆.vcxproj", "{9C776B16-FBEB-40D4-A346-114384E760E3}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|ARM = Debug|ARM | ||
Debug|ARM64 = Debug|ARM64 | ||
Debug|x64 = Debug|x64 | ||
Debug|x86 = Debug|x86 | ||
Release|ARM = Release|ARM | ||
Release|ARM64 = Release|ARM64 | ||
Release|x64 = Release|x64 | ||
Release|x86 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{9C776B16-FBEB-40D4-A346-114384E760E3}.Debug|ARM.ActiveCfg = Debug|ARM | ||
{9C776B16-FBEB-40D4-A346-114384E760E3}.Debug|ARM.Build.0 = Debug|ARM | ||
{9C776B16-FBEB-40D4-A346-114384E760E3}.Debug|ARM.Deploy.0 = Debug|ARM | ||
{9C776B16-FBEB-40D4-A346-114384E760E3}.Debug|ARM64.ActiveCfg = Debug|ARM64 | ||
{9C776B16-FBEB-40D4-A346-114384E760E3}.Debug|ARM64.Build.0 = Debug|ARM64 | ||
{9C776B16-FBEB-40D4-A346-114384E760E3}.Debug|ARM64.Deploy.0 = Debug|ARM64 | ||
{9C776B16-FBEB-40D4-A346-114384E760E3}.Debug|x64.ActiveCfg = Debug|x64 | ||
{9C776B16-FBEB-40D4-A346-114384E760E3}.Debug|x64.Build.0 = Debug|x64 | ||
{9C776B16-FBEB-40D4-A346-114384E760E3}.Debug|x64.Deploy.0 = Debug|x64 | ||
{9C776B16-FBEB-40D4-A346-114384E760E3}.Debug|x86.ActiveCfg = Debug|x86 | ||
{9C776B16-FBEB-40D4-A346-114384E760E3}.Debug|x86.Build.0 = Debug|x86 | ||
{9C776B16-FBEB-40D4-A346-114384E760E3}.Debug|x86.Deploy.0 = Debug|x86 | ||
{9C776B16-FBEB-40D4-A346-114384E760E3}.Release|ARM.ActiveCfg = Release|ARM | ||
{9C776B16-FBEB-40D4-A346-114384E760E3}.Release|ARM.Build.0 = Release|ARM | ||
{9C776B16-FBEB-40D4-A346-114384E760E3}.Release|ARM.Deploy.0 = Release|ARM | ||
{9C776B16-FBEB-40D4-A346-114384E760E3}.Release|ARM64.ActiveCfg = Release|ARM64 | ||
{9C776B16-FBEB-40D4-A346-114384E760E3}.Release|ARM64.Build.0 = Release|ARM64 | ||
{9C776B16-FBEB-40D4-A346-114384E760E3}.Release|ARM64.Deploy.0 = Release|ARM64 | ||
{9C776B16-FBEB-40D4-A346-114384E760E3}.Release|x64.ActiveCfg = Release|x64 | ||
{9C776B16-FBEB-40D4-A346-114384E760E3}.Release|x64.Build.0 = Release|x64 | ||
{9C776B16-FBEB-40D4-A346-114384E760E3}.Release|x64.Deploy.0 = Release|x64 | ||
{9C776B16-FBEB-40D4-A346-114384E760E3}.Release|x86.ActiveCfg = Release|x86 | ||
{9C776B16-FBEB-40D4-A346-114384E760E3}.Release|x86.Build.0 = Release|x86 | ||
{9C776B16-FBEB-40D4-A346-114384E760E3}.Release|x86.Deploy.0 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {B13AE56C-A90A-44BB-ACE8-3D913CC2041E} | ||
EndGlobalSection | ||
EndGlobal |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
##################################################### | ||
Arduino How To: Use sub folders for source code | ||
http://www.visualmicro.com/ | ||
##################################################### | ||
|
||
* .INO code can exist in the project folder and '\src' folder. | ||
* .Cpp/.c/.S/.h etc. can exist in the project folder, the '\src' folder and in any folder(s) below the '\src' folder. | ||
* .Cpp/.c/.S/.h sources in shared code projects should follow the same folder rules (because they are merged with the project sources into a temporary build folder prior to compile). | ||
|
||
* Use the 'Show All Files' icon above the 'Solution Explorer' to switch between 'included project files' and 'physical files/folders'. | ||
* Source code in the project folder will always be compiled regardless of inclusion in the project. This functionality can be disabled in Global Options. | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,202 @@ | ||
/* | ||
Name: 智能节水花盆.ino | ||
Created: 2023/3/15 0:22:26 | ||
Author: JasonYANG17 | ||
*/ | ||
//导入配置库 | ||
#include <GFX4d.h> | ||
#include <UnoWiFiDevEd.h> | ||
#include <Adafruit_SSD1306.h> //驱动128x64 and 128x32 的屏幕显示的库 | ||
#include <Adafruit_GFX.h> //Arduino的图形库 | ||
#include <Wire.h> | ||
#include <SPI.h> | ||
//配置屏幕像素 | ||
#define SCREEN_WIDTH 128 // OLED display width, in pixels | ||
#define SCREEN_HEIGHT 64 // OLED display height, in pixels | ||
// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins) | ||
//定义OLED恢复引脚,无则定义为-1 | ||
#define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin) | ||
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);//配置数据 | ||
// Example testing sketch for various DHT humidity/temperature sensors | ||
// Written by ladyada, public domain | ||
|
||
int M0 = 1024; //在空气中AO读取的值最大为1024,代表干燥时的读数 | ||
int M1 = 0; //浸泡在水里的最小值 464(最小值会改变),代表100%湿度 | ||
int PIN_AO = 14; //与wifi不冲突的pin | ||
int in1 = 0; | ||
int in2 = 2; | ||
int LED = 15; | ||
#include <DHT.h> | ||
#define DHTPIN 13//刚才插得2号引脚 | ||
#define DHTTYPE DHT11//定义类型 | ||
DHT dht(DHTPIN, DHTTYPE);//进行初始化设置 | ||
|
||
int buttonPin = 12; // 将开关连接到 | ||
int buttonState = 0;//开关状态为0 | ||
void setup() { | ||
Serial.begin(9600); | ||
dht.begin();//DHT开始工作 | ||
pinMode(PIN_AO, INPUT); | ||
pinMode(in1, OUTPUT); | ||
pinMode(in2, OUTPUT); | ||
pinMode(LED, OUTPUT); | ||
digitalWrite(in1, LOW); | ||
digitalWrite(in2, LOW); | ||
digitalWrite(LED, LOW); | ||
pinMode(buttonPin, INPUT_PULLUP); // 设置开关模式 | ||
//Serial.println("OLED FeatherWing test"); //串口输出信息 | ||
|
||
display.begin(SSD1306_SWITCHCAPVCC, 0x3c); //初始化OLED并设置其IIC地址为 0x3C | ||
display.clearDisplay(); //清屏 | ||
delay(200); | ||
|
||
display.setTextSize(1.3);//设置文本大小 | ||
display.setTextColor(SSD1306_WHITE);//设置字体颜色 | ||
display.setCursor(0, 0); //设置光标的位置 | ||
|
||
//绘制像素点 | ||
// display.drawPixel(64, 32, WHITE);//(x坐标,y坐标,颜色) | ||
|
||
//绘制水平线 | ||
// display.drawFastHLine(64,32,64,SSD1306_WHITE);//(x起点,y起点,长度,颜色) | ||
//绘制竖直线 | ||
// display.drawFastVLine(64,10,50,SSD1306_WHITE); | ||
|
||
//绘制线 | ||
// display.drawLine(0,0,128,64,SSD1306_WHITE);//(x起,y起,x终,y终) | ||
|
||
//绘制空心矩形 | ||
// display.drawRect(0,0,128,64,SSD1306_WHITE);//(左上角x坐标,左上角y坐标,矩形长,矩形宽) | ||
|
||
//绘制实心矩形 | ||
//display.fillRect(20,10,88,44,SSD1306_WHITE);//同上 | ||
|
||
//点亮全屏 | ||
// display.fillScreen(SSD1306_WHITE); | ||
|
||
//绘制空心圆 | ||
//display.drawCircle(64,32,32,SSD1306_WHITE);//(圆心x坐标,圆心y坐标,半径) | ||
|
||
//绘制实心圆 | ||
//display.fillCircle(64,32,31,SSD1306_WHITE); | ||
|
||
//绘制空心三角形 | ||
//display.drawTriangle(63,0, 0,63, 127,63, SSD1306_WHITE);//(第一顶点坐标[x,y],第二,第三) | ||
|
||
//绘制实心三角形 | ||
// display.fillTriangle(63,0, 0,63, 127,63, SSD1306_WHITE); | ||
|
||
//绘制空心圆角矩形 | ||
//display.drawRoundRect(10,5,107, 43,8, SSD1306_WHITE);//(左上角x,左上角y,矩形长,矩形宽,矩形圆角半径) | ||
|
||
//实心圆角 | ||
//display.fillRoundRect(10,5,107,53,3, SSD1306_WHITE); | ||
|
||
//绘制Bitmap图像 | ||
//Bimap图像数据 | ||
|
||
|
||
|
||
|
||
display.display(); | ||
display.println(""); | ||
display.println(""); | ||
|
||
display.println(" Wellcome To\n YANG\nIntelligent Flowerpot"); | ||
display.display(); | ||
delay(8000); | ||
// display.begin(SSD1306_SWITCHCAPVCC, 0x3c); //初始化OLED并设置其IIC地址为 0x3C | ||
} | ||
|
||
void loop() { | ||
// delay(2000); | ||
|
||
buttonState = digitalRead(buttonPin);//读取开关通断模式,并导入至开关状态 | ||
|
||
Serial.println(analogRead(14));//湿度传感器接ESP32上的GPIO号 | ||
delay(100); | ||
if (buttonState == LOW) { // 判断是否按下开关 | ||
display.clearDisplay(); //清屏 | ||
delay(200); | ||
|
||
|
||
display.setTextSize(1.3); | ||
display.setTextColor(SSD1306_WHITE); | ||
display.setCursor(0, 0); //设置光标的位置 | ||
|
||
// display.clearDisplay(); | ||
//delay(8000); | ||
|
||
digitalWrite(in2, LOW); | ||
digitalWrite(in1, LOW); | ||
digitalWrite(LED, LOW); | ||
|
||
display.println("Hello, user!"); | ||
display.println(""); | ||
display.println("Enter Emergency\nBraking"); | ||
display.println(""); | ||
display.println("All programs have\nbeen closed for you"); | ||
display.display(); | ||
|
||
// actually display all of the above | ||
|
||
delay(2000); | ||
} | ||
else { | ||
|
||
float h = dht.readHumidity();//读湿度 | ||
float t = dht.readTemperature();//读湿度 | ||
Serial.print("Humidity:");//湿度 | ||
Serial.print(h); | ||
Serial.println("%"); | ||
Serial.print("Temperatrue:");//温度 | ||
Serial.print(t); | ||
Serial.println("C"); | ||
display.clearDisplay(); | ||
delay(200); | ||
display.setTextSize(1.3); | ||
display.setTextColor(SSD1306_WHITE); | ||
display.setCursor(0, 0); //设置光标的位置 | ||
float HUMI = ((M0 - analogRead(PIN_AO)) / ((M0 - M1) / 100)); //将湿度模拟量转换成数字量 | ||
if (HUMI > 100.00) { | ||
HUMI = 100; | ||
} | ||
if (HUMI > 80) { | ||
digitalWrite(in2, LOW); | ||
digitalWrite(in1, LOW); | ||
digitalWrite(LED, LOW); | ||
} | ||
else { | ||
digitalWrite(in2, LOW); | ||
digitalWrite(in1, HIGH); | ||
digitalWrite(LED, HIGH); | ||
} | ||
Serial.print("HUMI= "); | ||
Serial.print(HUMI); | ||
Serial.println("% "); | ||
display.println("---------YANG--------"); | ||
display.println(""); | ||
display.print("Temperature: "); | ||
display.print(t); | ||
display.println("C"); | ||
display.print("Humidity: ");//湿度 | ||
display.print(h); | ||
display.println("%"); | ||
display.print("Soil Moisture: "); | ||
display.println(HUMI); | ||
if (HUMI > 80) { | ||
display.println("Watter: OFF"); | ||
display.println("Photosynthesis: OFF"); | ||
} | ||
else { | ||
display.println("Watter: ON"); | ||
display.println("Photosynthesis: ON"); | ||
} | ||
|
||
display.println("---Have a nice DAY!--"); | ||
//delay(1000); | ||
display.display(); | ||
|
||
|
||
} | ||
} |
Oops, something went wrong.