From 0e85ccceb1b871ba598df29585b2e5fc0dcb38b8 Mon Sep 17 00:00:00 2001 From: JasonYANG17 <39414350+JasonYANG170@users.noreply.github.com> Date: Mon, 24 Jun 2024 02:19:49 +0800 Subject: [PATCH] add FlowerpotOS3.1 --- FlowerpotOS2.0/LICENSE | 339 ++++ FlowerpotOS2.0/README.md | 58 + FlowerpotOS2.0/智能节水花盆.sln | 51 + .../智能节水花盆/__vm/Compile.vmps.xml | 37 + .../__vm/Configuration.Debug.vmps.xml | 9 + .../src/arduino folders read me.txt | 14 + FlowerpotOS2.0/智能节水花盆/智能节水花盆.ino | 202 +++ .../智能节水花盆/智能节水花盆.vcxproj | 128 ++ .../智能节水花盆/智能节水花盆.vcxproj.filters | 30 + FlowerpotOS3.1/README.md | 1 + FlowerpotOS3.1/data/contorl.html | 33 + FlowerpotOS3.1/data/index.html | 75 + FlowerpotOS3.1/data/info.html | 82 + FlowerpotOS3.1/data/update.html | 69 + FlowerpotOS3.1/data/wifi.html | 112 ++ FlowerpotOS3.1/include/README | 39 + FlowerpotOS3.1/lib/README | 46 + FlowerpotOS3.1/platformio.ini | 35 + FlowerpotOS3.1/src/main.cpp | 1376 +++++++++++++++++ FlowerpotOS3.1/src/picture.cpp | 294 ++++ FlowerpotOS3.1/src/picture.h | 14 + FlowerpotOS3.1/test/README | 11 + 22 files changed, 3055 insertions(+) create mode 100644 FlowerpotOS2.0/LICENSE create mode 100644 FlowerpotOS2.0/README.md create mode 100644 FlowerpotOS2.0/智能节水花盆.sln create mode 100644 FlowerpotOS2.0/智能节水花盆/__vm/Compile.vmps.xml create mode 100644 FlowerpotOS2.0/智能节水花盆/__vm/Configuration.Debug.vmps.xml create mode 100644 FlowerpotOS2.0/智能节水花盆/src/arduino folders read me.txt create mode 100644 FlowerpotOS2.0/智能节水花盆/智能节水花盆.ino create mode 100644 FlowerpotOS2.0/智能节水花盆/智能节水花盆.vcxproj create mode 100644 FlowerpotOS2.0/智能节水花盆/智能节水花盆.vcxproj.filters create mode 100644 FlowerpotOS3.1/README.md create mode 100644 FlowerpotOS3.1/data/contorl.html create mode 100644 FlowerpotOS3.1/data/index.html create mode 100644 FlowerpotOS3.1/data/info.html create mode 100644 FlowerpotOS3.1/data/update.html create mode 100644 FlowerpotOS3.1/data/wifi.html create mode 100644 FlowerpotOS3.1/include/README create mode 100644 FlowerpotOS3.1/lib/README create mode 100644 FlowerpotOS3.1/platformio.ini create mode 100644 FlowerpotOS3.1/src/main.cpp create mode 100644 FlowerpotOS3.1/src/picture.cpp create mode 100644 FlowerpotOS3.1/src/picture.h create mode 100644 FlowerpotOS3.1/test/README diff --git a/FlowerpotOS2.0/LICENSE b/FlowerpotOS2.0/LICENSE new file mode 100644 index 0000000..d159169 --- /dev/null +++ b/FlowerpotOS2.0/LICENSE @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/FlowerpotOS2.0/README.md b/FlowerpotOS2.0/README.md new file mode 100644 index 0000000..6d75db6 --- /dev/null +++ b/FlowerpotOS2.0/README.md @@ -0,0 +1,58 @@ +
+

Flowerpot交互花盆

+ + + +
+ Discord +
+ +
+这是一项基于C++语言,以ESP8266为核心处理器开发的Arduino物联网项目 + +
+本项目开源版本为Core版本,请遵守GPL2.0开源许可协议 +
+ +## 演示视频 +[哔哩哔哩](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红蓝光模块,自动浇水模块,笔筒组件等等。 + + + + + diff --git a/FlowerpotOS2.0/智能节水花盆.sln b/FlowerpotOS2.0/智能节水花盆.sln new file mode 100644 index 0000000..3403ea6 --- /dev/null +++ b/FlowerpotOS2.0/智能节水花盆.sln @@ -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 diff --git a/FlowerpotOS2.0/智能节水花盆/__vm/Compile.vmps.xml b/FlowerpotOS2.0/智能节水花盆/__vm/Compile.vmps.xml new file mode 100644 index 0000000..249a636 --- /dev/null +++ b/FlowerpotOS2.0/智能节水花盆/__vm/Compile.vmps.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + 104 +105 display.println(" Wellcome To\n YANG\nIntelligent Flowerpot"); +106 display.display(); +107 delay(8000); +108 // display.begin(SSD1306_SWITCHCAPVCC, 0x3c); //初始化OLED并设置其IIC地址为 0x3C +109 } +110 +-->111 void loop() { +112 // delay(2000); +113 +114 buttonState = digitalRead(buttonPin); +115 +116 Serial.println(analogRead(14));//湿度传感器接ESP32上的GPIO号 +117 delay(100); +118 if (buttonState == LOW) { // 判断是否按下开关 +119 display.clearDisplay(); //清屏 +120 delay(200); + + + + + + + + \ No newline at end of file diff --git a/FlowerpotOS2.0/智能节水花盆/__vm/Configuration.Debug.vmps.xml b/FlowerpotOS2.0/智能节水花盆/__vm/Configuration.Debug.vmps.xml new file mode 100644 index 0000000..3ccf3f3 --- /dev/null +++ b/FlowerpotOS2.0/智能节水花盆/__vm/Configuration.Debug.vmps.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/FlowerpotOS2.0/智能节水花盆/src/arduino folders read me.txt b/FlowerpotOS2.0/智能节水花盆/src/arduino folders read me.txt new file mode 100644 index 0000000..71714e3 --- /dev/null +++ b/FlowerpotOS2.0/智能节水花盆/src/arduino folders read me.txt @@ -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. + + + diff --git a/FlowerpotOS2.0/智能节水花盆/智能节水花盆.ino b/FlowerpotOS2.0/智能节水花盆/智能节水花盆.ino new file mode 100644 index 0000000..a695bf5 --- /dev/null +++ b/FlowerpotOS2.0/智能节水花盆/智能节水花盆.ino @@ -0,0 +1,202 @@ +/* + Name: 智能节水花盆.ino + Created: 2023/3/15 0:22:26 + Author: JasonYANG17 +*/ +//导入配置库 +#include +#include +#include //驱动128x64 and 128x32 的屏幕显示的库 +#include //Arduino的图形库 +#include +#include +//配置屏幕像素 +#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 +#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(); + + + } +} diff --git a/FlowerpotOS2.0/智能节水花盆/智能节水花盆.vcxproj b/FlowerpotOS2.0/智能节水花盆/智能节水花盆.vcxproj new file mode 100644 index 0000000..278db26 --- /dev/null +++ b/FlowerpotOS2.0/智能节水花盆/智能节水花盆.vcxproj @@ -0,0 +1,128 @@ + + + + + Debug + ARM + + + Release + ARM + + + Debug + ARM64 + + + Release + ARM64 + + + Debug + x86 + + + Release + x86 + + + Debug + x64 + + + Release + x64 + + + + {9c776b16-fbeb-40d4-a346-114384e760e3} + Linux + 智能节水花盆 + 智能节水花盆 + 15.0 + Linux + 1.0 + Generic + {D51BCBC9-82E9-4017-911E-C93873C4EA2B} + + + + + true + + + false + + + true + + + false + + + true + + + false + + + false + + + true + + + + + + c:\visualmicro\ignore + c:\visualmicro\pi-ignore + Arduino + + + + CppCode + true + + + + + + + + + + + + + + VisualMicroDebugger + + + $(ProjectDir)..\..\..\Arduino\libraries\GFX4d\src;$(ProjectDir)..\..\..\..\AppData\Local\arduino15\libraries\SD\src;$(ProjectDir)..\..\..\Arduino\libraries\Arduino_Uno_WiFi_Dev_Ed_Library\src;$(ProjectDir)..\..\..\Arduino\libraries\Adafruit_SSD1306;$(ProjectDir)..\..\..\Arduino\libraries\Adafruit_GFX_Library;$(ProjectDir)..\..\..\Arduino\libraries\Adafruit_BusIO;$(ProjectDir)..\..\..\..\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src;$(ProjectDir)..\..\..\..\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src;$(ProjectDir)..\..\..\Arduino\libraries\DHT_sensor_library;$(ProjectDir)..\..\..\..\..\..\\Users\\qw200\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino;$(ProjectDir)..\..\..\..\..\..\\Users\\qw200\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard;$(ProjectDir)..\..\..\..\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\lib\gcc\avr\7.3.0\include;$(ProjectDir)..\..\..\..\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\lib\gcc\avr\7.3.0\include-fixed;$(ProjectDir)..\..\..\..\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\avr\include;$(ProjectDir)..\..\..\Arduino\libraries\GFX4d\src;$(ProjectDir)..\..\..\Arduino\libraries\Adafruit_SSD1306;$(ProjectDir)..\..\..\Arduino\libraries\Adafruit_GFX_Library;$(ProjectDir)..\..\..\..\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src;$(ProjectDir)..\..\..\..\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src\utility;$(ProjectDir)..\..\..\..\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src;$(ProjectDir)..\..\..\Arduino\libraries\DHT_sensor_library;$(ProjectDir)..\..\..\Arduino\libraries\Arduino_Uno_WiFi_Dev_Ed_Library\src + $(ProjectDir)..\..\..\..\..\..\\Users\\qw200\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7\bin\avr-g++ + $(ProjectDir)..\..\..\..\..\..\\Users\\qw200\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7\bin\avr-g++ + false + + + + $(ProjectDir)..\..\..\Arduino\libraries\GFX4d\src;$(ProjectDir)..\..\..\..\AppData\Local\arduino15\libraries\SD\src;$(ProjectDir)..\..\..\Arduino\libraries\Arduino_Uno_WiFi_Dev_Ed_Library\src;$(ProjectDir)..\..\..\Arduino\libraries\Adafruit_SSD1306;$(ProjectDir)..\..\..\Arduino\libraries\Adafruit_GFX_Library;$(ProjectDir)..\..\..\Arduino\libraries\Adafruit_BusIO;$(ProjectDir)..\..\..\..\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src;$(ProjectDir)..\..\..\..\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src;$(ProjectDir)..\..\..\Arduino\libraries\DHT_sensor_library;$(ProjectDir)..\..\..\..\..\..\\Users\\qw200\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino;$(ProjectDir)..\..\..\..\..\..\\Users\\qw200\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard;$(ProjectDir)..\..\..\..\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\lib\gcc\avr\7.3.0\include;$(ProjectDir)..\..\..\..\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\lib\gcc\avr\7.3.0\include-fixed;$(ProjectDir)..\..\..\..\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\avr\include;$(ProjectDir)..\..\..\Arduino\libraries\GFX4d\src;$(ProjectDir)..\..\..\Arduino\libraries\Adafruit_SSD1306;$(ProjectDir)..\..\..\Arduino\libraries\Adafruit_GFX_Library;$(ProjectDir)..\..\..\..\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src;$(ProjectDir)..\..\..\..\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src\utility;$(ProjectDir)..\..\..\..\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src;$(ProjectDir)..\..\..\Arduino\libraries\DHT_sensor_library;$(ProjectDir)..\..\..\Arduino\libraries\Arduino_Uno_WiFi_Dev_Ed_Library\src;%(AdditionalIncludeDirectories) + $(ProjectDir)..\..\..\..\..\..\\Users\\qw200\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7\bin\avr-g++ + gnu++11 + gnu11 + + + $(ProjectDir)..\..\..\..\..\..\program files\microsoft visual studio\2022\community\common7\ide\extensions\0axxbbxm.vxj\Micro Platforms\default\vm-intelli-pre.h;$(ProjectDir)..\..\..\..\AppData\Local\Temp\VMBuilds\智能节水花盆\unowifi\Debug\.vmintelli\aaf59a5be9d08a6e007ec97fcb20ad5a\vm-intelli-gcc-defines.h;$(ProjectDir)..\..\..\..\..\..\program files\microsoft visual studio\2022\community\common7\ide\extensions\0axxbbxm.vxj\Micro Platforms\default\vm-intelli-post.h;$(ProjectDir)__vm\.智能节水花盆.vsarduino.h;%(ForcedIncludeFiles) + true + true + _VMICRO_INTELLISENSE;__AVR_atmega328p__;__AVR_ATmega328P__;__AVR_ATmega328p__;_VMDEBUG=1;F_CPU=16000000L;ARDUINO=108010;ARDUINO_AVR_UNO_WIFI_DEV_ED;ARDUINO_ARCH_AVR;ESP_CH_UART;ESP_CH_UART_BR=19200;%(PreprocessorDefinitions) + + + + + + + + + + \ No newline at end of file diff --git a/FlowerpotOS2.0/智能节水花盆/智能节水花盆.vcxproj.filters b/FlowerpotOS2.0/智能节水花盆/智能节水花盆.vcxproj.filters new file mode 100644 index 0000000..eb6d625 --- /dev/null +++ b/FlowerpotOS2.0/智能节水花盆/智能节水花盆.vcxproj.filters @@ -0,0 +1,30 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + xml;json;txt;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Misc Files + + + + + + + + Header Files + + + \ No newline at end of file diff --git a/FlowerpotOS3.1/README.md b/FlowerpotOS3.1/README.md new file mode 100644 index 0000000..988e7f9 --- /dev/null +++ b/FlowerpotOS3.1/README.md @@ -0,0 +1 @@ +## hi diff --git a/FlowerpotOS3.1/data/contorl.html b/FlowerpotOS3.1/data/contorl.html new file mode 100644 index 0000000..ed07a50 --- /dev/null +++ b/FlowerpotOS3.1/data/contorl.html @@ -0,0 +1,33 @@ + + + + + + 控制台 + + + + + +
+ + +
+ + +
+ + + + \ No newline at end of file diff --git a/FlowerpotOS3.1/data/index.html b/FlowerpotOS3.1/data/index.html new file mode 100644 index 0000000..de8b3e2 --- /dev/null +++ b/FlowerpotOS3.1/data/index.html @@ -0,0 +1,75 @@ + + + + + + 万物互联IOT离线控制中心 + + + +
+

万物互联IOT离线控制中心

+

欢迎使用我们的物联网产品,这里是离线控制台,您可以在此配置产品设置

+ 配网 + 控制台 + 设备信息 + 固件升级 +
+ + \ No newline at end of file diff --git a/FlowerpotOS3.1/data/info.html b/FlowerpotOS3.1/data/info.html new file mode 100644 index 0000000..75277e6 --- /dev/null +++ b/FlowerpotOS3.1/data/info.html @@ -0,0 +1,82 @@ + + + + + + 设备信息 + + + + + + + + + \ No newline at end of file diff --git a/FlowerpotOS3.1/data/update.html b/FlowerpotOS3.1/data/update.html new file mode 100644 index 0000000..59b6d87 --- /dev/null +++ b/FlowerpotOS3.1/data/update.html @@ -0,0 +1,69 @@ + + + + + + WIFI配置 + + + + + +
+

固件升级

+

非专业用户请勿擅自使用本功能,否则后果自负

+

请在下方选择用于升级的bin文件

+
+ + +
+ + +
+ + + + \ No newline at end of file diff --git a/FlowerpotOS3.1/data/wifi.html b/FlowerpotOS3.1/data/wifi.html new file mode 100644 index 0000000..2dcbbb3 --- /dev/null +++ b/FlowerpotOS3.1/data/wifi.html @@ -0,0 +1,112 @@ + + + + + + WIFI配置 + + + + +
+
+

万物互联IOT离线控制中心

+ + + + + + + +
+ + +
+ + + +
+
+ + + \ No newline at end of file diff --git a/FlowerpotOS3.1/include/README b/FlowerpotOS3.1/include/README new file mode 100644 index 0000000..45496b1 --- /dev/null +++ b/FlowerpotOS3.1/include/README @@ -0,0 +1,39 @@ + +This directory is intended for project header files. + +A header file is a file containing C declarations and macro definitions +to be shared between several project source files. You request the use of a +header file in your project source file (C, C++, etc) located in `src` folder +by including it, with the C preprocessing directive `#include'. + +```src/main.c + +#include "header.h" + +int main (void) +{ + ... +} +``` + +Including a header file produces the same results as copying the header file +into each source file that needs it. Such copying would be time-consuming +and error-prone. With a header file, the related declarations appear +in only one place. If they need to be changed, they can be changed in one +place, and programs that include the header file will automatically use the +new version when next recompiled. The header file eliminates the labor of +finding and changing all the copies as well as the risk that a failure to +find one copy will result in inconsistencies within a program. + +In C, the usual convention is to give header files names that end with `.h'. +It is most portable to use only letters, digits, dashes, and underscores in +header file names, and at most one dot. + +Read more about using header files in official GCC documentation: + +* Include Syntax +* Include Operation +* Once-Only Headers +* Computed Includes + +https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html diff --git a/FlowerpotOS3.1/lib/README b/FlowerpotOS3.1/lib/README new file mode 100644 index 0000000..8c9c29c --- /dev/null +++ b/FlowerpotOS3.1/lib/README @@ -0,0 +1,46 @@ + +This directory is intended for project specific (private) libraries. +PlatformIO will compile them to static libraries and link into executable file. + +The source code of each library should be placed in a an own separate directory +("lib/your_library_name/[here are source files]"). + +For example, see a structure of the following two libraries `Foo` and `Bar`: + +|--lib +| | +| |--Bar +| | |--docs +| | |--examples +| | |--src +| | |- Bar.c +| | |- Bar.h +| | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html +| | +| |--Foo +| | |- Foo.c +| | |- Foo.h +| | +| |- README --> THIS FILE +| +|- platformio.ini +|--src + |- main.c + +and a contents of `src/main.c`: +``` +#include +#include + +int main (void) +{ + ... +} + +``` + +PlatformIO Library Dependency Finder will find automatically dependent +libraries scanning project source files. + +More information about PlatformIO Library Dependency Finder +- https://docs.platformio.org/page/librarymanager/ldf.html diff --git a/FlowerpotOS3.1/platformio.ini b/FlowerpotOS3.1/platformio.ini new file mode 100644 index 0000000..0485637 --- /dev/null +++ b/FlowerpotOS3.1/platformio.ini @@ -0,0 +1,35 @@ +; PlatformIO Project Configuration File +; +; Build options: build flags, source filter +; Upload options: custom upload port, speed and extra flags +; Library options: dependencies, extra library storages +; Advanced options: extra scripting +; +; Please visit documentation for the other options and examples +; https://docs.platformio.org/page/projectconf.html + +[env:nodemcuv2] +platform = espressif8266 +board = nodemcuv2 +framework = arduino +board_build.filesystem = littlefs +lib_deps = + tzapu/WiFiManager@^0.16.0 + adafruit/Adafruit SH110X@^2.1.10 + arduino-libraries/NTPClient@^3.2.1 + adafruit/Adafruit AHTX0@^2.0.5 + knolleary/PubSubClient@^2.8 + bblanchon/ArduinoJson@^7.0.4 + adafruit/Adafruit GFX Library@^1.11.9 + +[env:my_build_env] +platform = espressif8266 +framework = arduino +lib_deps = + tzapu/WiFiManager@^0.16.0 + adafruit/Adafruit SH110X@^2.1.10 + arduino-libraries/NTPClient@^3.2.1 + adafruit/Adafruit AHTX0@^2.0.5 + knolleary/PubSubClient@^2.8 + bblanchon/ArduinoJson@^7.0.4 + adafruit/Adafruit GFX Library@^1.11.9 diff --git a/FlowerpotOS3.1/src/main.cpp b/FlowerpotOS3.1/src/main.cpp new file mode 100644 index 0000000..fc09cc5 --- /dev/null +++ b/FlowerpotOS3.1/src/main.cpp @@ -0,0 +1,1376 @@ +/* + Name: FlowerpotOS.ino + Created: 2023/4/11 23:34:18 + Author: qw200 +*/ + + +int LocalVersionint = 500;//版本号缩写 +// the setup function runs once when you press reset or power the board +#include //默认,加载MQTT库文件 +#include +#include +#include +#include //驱动128x64 and 128x32 的屏幕显示的库 +#include //Arduino的图形库 +#include +#include +#include +#include +#include + // 引入WiFiManager库 +#include "FS.h" +#include +#include +#include +#include +#include +#include + +#include +#include +WiFiUDP ntpUDP; + +String UPst = ""; +String NewVersion = ""; +NTPClient timeClient(ntpUDP, "ntp1.aliyun.com", 60 * 60 * 8, 60 * 1000); +//#include +#include +#include +long timeval = 3 * 1000; +long lastMsg = 0;//时间戳 +String LocalVersion = "V5.0.0";//版本号 +Adafruit_AHTX0 aht; +#include "picture.cpp" +//#define DHTPIN 13//土壤湿度传感器 +//#define DHTTYPE DHT11//传感器类型 +#define SCREEN_WIDTH 128 // OLED display width, in pixels +#define SCREEN_HEIGHT 64 // OLED display height, in pixels +#include +#define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin) +int HOT = 14;//加热片 +int M0 = 1024; //在空气中AO读取的值最大为1024,代表干燥时的读数 +int M1 = 0; //浸泡在水里的最小值 464(最小值会改变),代表100%湿度 +int PIN_AO = A0; //土壤湿度传感器 +int Pump = 0;//水泵 +int LED = 13;//LED灯 +//int LIGHT = 13;//光敏传感器 +int buttonPin = 12; //按键引脚 +int buttonState = 0;//按键状态 +int counter = 0;//按键次数计数器 +//DHT dht(DHTPIN, DHTTYPE);//进行初始化设置 +Adafruit_SH1106G display = Adafruit_SH1106G(128, 64, &Wire);//显示设置 +String upUrl = "http://bin.bemfa.com/b/1BcNDZkMzZjNTM2ODQ0NDIzNTkwMzk4OWFiOGQ1ODE5OTM=Flowerpot.bin"; +String mqtt_server = "";//默认,MQTT服务器 +int mqtt_server_port = 0;//默认,MQTT服务器 +String mqtt_username = ""; +String mqtt_password = ""; +String ID_MQTT = "" ; //修改,你的Client ID +String topic = ""; //主题名字,可在巴法云控制台自行创建,名称随意 +WiFiClient espClient; +PubSubClient client(espClient); +//灯光函数及引脚定义 +void Updata(); +int LEDst = 0;//st结尾为状态记录 +int HOTst = 0; +int PUMPst = 0; +boolean WIFIst = false; +void OffLed();//接收方法 +void ONLed(); +void OFFHOT(); +void ONHOT(); +void ONPUMP(); +void OFFPUMP(); +void ONAUTO(); +void OFFAUTO(); +//-----cpp文件全局定义--------- +void open(); +void Netshare(); +void frist(); +void second(); +void third(); +void fourth(); +void fifth(); +void six(); +void updatainfo(); +void updateBin(); + +int AUTOst = 0; +const int B_led = D4; +int updst = 0; +uint64_t chipId; + + +//WiFiManager wifiManager; +const char* AP_NAME = "配网WIFI"; // WiFi名称 +char sta_ssid[32] = { 0 }; +char sta_password[64] = { 0 }; + +void connectNewWifi(); +const byte DNS_PORT = 53; +IPAddress apIP(192, 168, 4, 1); +DNSServer dnsServer; +ESP8266WebServer server(80); +ESP8266HTTPUpdateServer httpUpdater; +int conv2int(char c) { + if (c >= '0' && c <= '9') { + return c - '0'; + } + if (c >= 'A' && c <= 'F') { + return c - 'A' + 10; + } + if (c >= 'a' && c <= 'f') { + return c - 'a' + 10; + } + return 0; // default return if input is not a valid hexadecimal character +} + +String urldecode(const String &str) { + String ret; + char ch; + char code0; + char code1; + for (unsigned int i = 0; i < str.length(); i++) { + if (str[i] == '%') { + ch = conv2int(str[++i]); + code0 = ch << 4; + ch = conv2int(str[++i]); + code1 = code0 + ch; + ret.concat(code1); + } else { + ret.concat(str[i]); + } + } + return ret; +} +void INDEXhtml() { + File htmlFile = LittleFS.open("/index.html", "r"); + server.streamFile(htmlFile, "text/html"); + htmlFile.close(); +} +void INFOhtml() { + File htmlFile = LittleFS.open("/info.html", "r"); + server.streamFile(htmlFile, "text/html"); + htmlFile.close(); +} +void WIFIhtml() { + File htmlFile = LittleFS.open("/wifi.html", "r"); + server.streamFile(htmlFile, "text/html"); + htmlFile.close(); +} +void UPDATEhtml() { + File htmlFile = LittleFS.open("/update.html", "r"); + server.streamFile(htmlFile, "text/html"); + htmlFile.close(); +} + +void Contolhtml() { + String autoButton = (AUTOst == 0) ? "关" : "开"; + String ledButton = (LEDst == 0) ? "关" : "开"; + String hotButton = (HOTst == 0) ? "关" : "开"; + String pumpButton = (PUMPst == 0) ? "关" : "开"; + + String page = "\ + \ + \ + \ + \ + \ + 控制台\ + \ + \ + \ + \ +

离线控制台

\ +

自动控制

\ + \ + \ +

补光灯控制

\ + \ + \ +

土壤恒温控制

\ + \ + \ +

浇水控制

\ + \ + \ + \ + "; + + server.send(200, "text/html", page); +} + +void ContolhtmlPost() { + if (server.hasArg("status") && server.hasArg("id") && server.method() == HTTP_POST) { + int id = server.arg("id").toInt(); + int newStatus = server.arg("status").toInt(); + + if (id == 1) { + AUTOst = newStatus; + server.send(200, "text/plain", "AUTOst 已更新为: " + String(AUTOst)); + } else if (id == 2) { + LEDst = newStatus; + server.send(200, "text/plain", "LEDst 已更新为: " + String(LEDst)); + } else if (id == 3) { + HOTst = newStatus; + server.send(200, "text/plain", "HOTst 已更新为: " + String(HOTst)); + } else if (id == 4) { + PUMPst = newStatus; + server.send(200, "text/plain", "PUMPst 已更新为: " + String(PUMPst)); + } else { + server.send(400, "text/plain", "无效的按钮 ID"); + } + } else { + server.send(400, "text/plain", "缺少参数或请求方法不正确"); + } +} + + + +void initBasic(void) { + Serial.begin(115200); + WiFi.hostname("Smart-ESP8266"); +} + +void initSoftAP(void) { + WiFi.mode(WIFI_AP_STA); + WiFi.softAPConfig(apIP, apIP, IPAddress(255, 255, 255, 0)); + if (WiFi.softAP(AP_NAME)) { + Serial.println("ESP8266 SoftAP is started"); + } +} + +void WIFIhtmlPost() { + Serial.println("WIFIhtmlPost"); + if (server.hasArg("ssid")) { + String encodedSSID = server.arg("ssid"); + String decodedSSID = urldecode(encodedSSID); + strcpy(sta_ssid, decodedSSID.c_str()); + Serial.println(sta_ssid); + } else { + Serial.println("error, SSID not found"); + server.send(200, "text/html", "error, SSID not found"); + return; + } + + if (server.hasArg("password")) { + String password = server.arg("password"); + strcpy(sta_password, password.c_str()); + } else { + Serial.println("error, password not found"); + server.send(200, "text/html", "error, password not found"); + return; + } + //mqtt + if (server.hasArg("host")) { + mqtt_server = server.arg("host"); + } else { + Serial.println("error, password not found"); + // server.send(200, "text/html", "error, password not found"); + return; + } + + if (server.hasArg("port")) { + mqtt_server_port = server.arg("port").toInt(); + + } else { + Serial.println("error, password not found"); + //server.send(200, "text/html", "error, password not found"); + return; + } + + if (server.hasArg("client")) { + ID_MQTT = server.arg("client"); + + } else { + Serial.println("error, password not found"); + // server.send(200, "text/html", "error, password not found"); + return; + } + + if (server.hasArg("topic")) { + topic = server.arg("topic"); + // strcpy(sta_password, password.c_str()); + } else { + Serial.println("error, password not found"); + // server.send(200, "text/html", "error, password not found"); + return; + } + + if (server.hasArg("user")) { + mqtt_username = server.arg("user"); + // strcpy(sta_password, password.c_str()); + } else { + Serial.println("error, password not found"); + // server.send(200, "text/html", "error, password not found"); + return; + } + if (server.hasArg("mqttpassword")) { + mqtt_password = server.arg("mqttpassword"); + // strcpy(sta_password, password.c_str()); + } else { + Serial.println("error, password not found"); + // server.send(200, "text/html", "error, password not found"); + return; + } + delay(2000); + connectNewWifi(); + + if (WiFi.status() == WL_CONNECTED) { + // 如果已连接到WiFi,则重定向到新IP + String newIPAddress = "http://" + WiFi.localIP().toString(); + server.sendHeader("Location", newIPAddress, true); + server.send(302, "text/plain", ""); + server.client().stop(); + delay(3000); + WiFi.mode(WIFI_STA); + return; // 结束处理 + // return; + + } + + // WiFi.mode(WIFI_STA); + + + +} +void initWebServer(void) { + server.on("/", HTTP_GET, INDEXhtml); + server.on("/wifi", HTTP_GET, WIFIhtml); + server.onNotFound(WIFIhtml); + server.on("/wifi", HTTP_POST, WIFIhtmlPost); + server.on("/contol", HTTP_GET, Contolhtml); + server.on("/contol", HTTP_POST, ContolhtmlPost); + server.on("/info", HTTP_GET, INFOhtml); + server.on("/update", HTTP_GET, UPDATEhtml); + server.begin(); + Serial.println("WebServer started!"); +} + +void initDNS(void) { + if (dnsServer.start(DNS_PORT, "*", apIP)) { + Serial.println("DNS Server started successfully"); + } else { + Serial.println("Failed to start DNS Server"); + } +} + +void connectNewWifi(void) { + // WiFi.mode(WIFI_STA); + Serial.println(WIFIst); + WiFi.setAutoConnect(true); + WiFi.begin(sta_ssid, sta_password); + Serial.print("connectNewWifi: in"); + Serial.println(sta_ssid); + Serial.println(sta_password); + int count = 0; + while (WiFi.status() != WL_CONNECTED) { + delay(500); + count++; + Serial.print(count); + if (count > 10) { + Serial.print("connectNewWifi: "+count); + initSoftAP(); + initWebServer(); + initDNS(); + break; + } + } + + Serial.println(WIFIst); + if (WiFi.status() == WL_CONNECTED) { + + // Serial.println(WIFIst); + Serial.print("IP address: "); + Serial.println(WiFi.localIP()); + // server.stop(); + Serial.println("Connected to WiFi"); + Serial.println("Connected to WiFi!!!!!!!!!!"); + Serial.println(WiFi.localIP()); + initWebServer(); + //server.on("/sdd", HTTP_GET, WIFIhtml); + // server.on("/wifiok", []() { + // server.send(200, "text/plain", "WIFI OK"); + // }); + + // server.begin(); + WIFIst = true; + Serial.println(WIFIst); + } +} + +//---------------------------------------------- +void callback(char* topic, byte* payload, unsigned int length) { + Serial.print("Message arrived ["); + Serial.print(topic); + Serial.print("] "); + String Mqtt_Buff = ""; + for (int i = 0; i < length; i++) { + Mqtt_Buff += (char)payload[i]; + } + Serial.print(Mqtt_Buff); + Serial.println(); + chipId = ESP.getChipId(); + // 将 uint64_t 转换为字符串格式 + char chipIdStr[20]; // 定义一个足够大的字符数组来存储转换结果 + itoa(chipId, chipIdStr, 10); + + // 将转换的结果构建为Arduino的String对象 + String chipIdString(chipIdStr); + Serial.println(chipIdString); + + // Switch on the LED if an 1 was received as first character + if (Mqtt_Buff == "#IDTO" + chipIdString + "&Updata") {//如果接收字符on,亮灯 + Updata();//开灯函数 + Serial.println("updata"); + } + else if (Mqtt_Buff == "#IDTO" + chipIdString + "&OFFLED") {//如果接收字符off,亮灯 + OffLed();//关灯函数 + Serial.println("updata!!!!"); + } + else if (Mqtt_Buff == "#IDTO" + chipIdString + "&ONLED") {//如果接收字符off,亮灯 + ONLed();//关灯函数 + } + else if (Mqtt_Buff == "#IDTO" + chipIdString + "&OFFHOT") {//如果接收字符off,亮灯 + OFFHOT();//关灯函数 + } + else if (Mqtt_Buff == "#IDTO" + chipIdString + "&ONHOT") {//如果接收字符off,亮灯 + ONHOT();//关灯函数 + + } + else if (Mqtt_Buff == "#IDTO" + chipIdString + "&OFFPUMP") {//如果接收字符off,亮灯 + OFFPUMP();//关灯函数 + } + else if (Mqtt_Buff == "#IDTO" + chipIdString + "&ONPUMP") {//如果接收字符off,亮灯 + ONPUMP();//关灯函数 + + } + else if (Mqtt_Buff == "#IDTO" + chipIdString + "&OFFAUTO") {//如果接收字符off,亮灯 + OFFAUTO();//关灯函数 + } + else if (Mqtt_Buff == "#IDTO" + chipIdString + "&ONAUTO") {//如果接收字符off,亮灯 + ONAUTO();//关灯函数 + + } + Mqtt_Buff = ""; +} + +void reconnect() { + client.setServer(mqtt_server.c_str(), mqtt_server_port); + client.setCallback(callback); + // Loop until we're reconnected + // while (!client.connected()) { + Serial.print("Attempting MQTT connection..."); + // Attempt to connect + if (client.connect(ID_MQTT.c_str(), mqtt_username.c_str(), mqtt_password.c_str())) { + Serial.println("connected"); + + client.subscribe(topic.c_str());//修改,修改为你的主题 + } + else { + Serial.print("failed, rc="); + Serial.print(client.state()); + Serial.println(" try again in 5 seconds"); + // Wait 5 seconds before retrying + delay(5000); + } + // } +} + + +void setup() { + + Serial.println("128x64 OLED FeatherWing test"); + + chipId = ESP.getChipId(); + if (aht.begin()) { + Serial.println("Found AHT20"); + } + else { + Serial.println("Didn't find AHT20"); + } + // dht.begin();//DHT开始工作 + analogWrite(13, 31); // 使用PWM设置数字引脚13(通常对应D7)的输出占空比为31 + + timeClient.begin(); + // PWM的值范围是0到255,其中0表示0%的占空比(完全关闭),255表示100%的占空比(完全打开) + // 因此,设置占空比为31表示大约12%的占空比 + + // 通过调整占空比,可以控制引脚上输出的电压平均值的大小 + // 在这种情况下,引脚13将以约12%的占空比以一定的频率产生一个脉冲信号 + // 该脉冲信号的平均值对应于31/255*Vref(假设使用5V供电)的电压输出 + // 这样可以模拟出一个介于0V和Vref之间的中间值 + pinMode(PIN_AO, INPUT); + pinMode(HOT, OUTPUT); + pinMode(Pump, OUTPUT); + + + pinMode(LED, OUTPUT); + pinMode(buttonPin, INPUT_PULLUP); // 设置buttonPin引脚的模式为输入模式,并启用上拉电阻 + + // 使用pinMode函数将buttonPin引脚设置为输入模式 + // INPUT_PULLUP表示在引脚输入模式下,启用内部上拉电阻 + // 上拉电阻可确保引脚在未连接到外部电路时保持高电平状态 + + // 通常,当按钮未按下时,按钮引脚处于高电平状态(由内部上拉电阻提供) + // 当按钮按下时,按钮引脚会连接到地,形成低电平状态 + + // 配置输入引脚时,使用上拉电阻可以简化电路设计,无需额外的外部上拉电阻器 + // 这有助于防止未连接到外部电路时的"悬空"引脚状态,提高电路稳定性 + digitalWrite(Pump, LOW); + + digitalWrite(LED, LOW); + open();//开机LOGO + Serial.println("128x64 OLED FeatherWisssssng test"); + if (!LittleFS.begin()) { + Serial.println("Failed to mount LittleFS"); + return; + } + Serial.println(WIFIst); + initBasic(); + connectNewWifi(); + + httpUpdater.setup(&server); + + server.begin(); + // Serial.println(WIFIst); +} +int numwifi = 0; +int chos = 0; +void loop() { + // Serial.println(WIFIst); + server.handleClient(); + dnsServer.processNextRequest(); + // Serial.println(" Serial.println(status);"); + //Serial.println(status); + + // Serial.println("Connected was... OK"); + + + // if (chos == 0) { + // connectNewWifi(); + + // chos++; + + // } + Serial.println("---------------------"); + Serial.println(LEDst); + Serial.println(PUMPst); + if(WIFIst) { + Netshare(); + } + unsigned long currentMillis = 0; + buttonState = digitalRead(buttonPin); // 读取按钮状态 + // 按钮按下时,计数器加1 + if (buttonState == LOW) { + currentMillis = millis(); // 获取当前时间 + delay(500); // 延时去抖动 + counter++; + if (counter > 5) { + counter = 0; // 计数器超过2时,重置为0 + } + } + if (buttonState == HIGH) { + if (millis() - currentMillis < 3000) {// 获取当前时间 + delay(500); // 延时去抖动 + counter++; + if (counter > 5) { + counter = 0; // 计数器超过2时,重置为0 + } + } + } + //WifiConnect(); + Serial.println("mqtt-------------------------"); + Serial.println(mqtt_server); + Serial.println(mqtt_server_port); + Serial.println(mqtt_password); + Serial.println(mqtt_username); + Serial.println(ID_MQTT); + Serial.println(topic); + if (numwifi != 0) { + + } + else { + if (counter == 0) { + + frist(); + } + else if (counter == 1) { + second(); + } + else if (counter == 2) { + third(); + + } + else if (counter == 3) { + fourth(); + } + else if (counter == 4) { + fifth(); + } + else if (counter == 5) { + six(); + } + Serial.println(counter); //输出计数器数值 + } + + /* + Serial.println("Connected was... OK"); + server.handleClient(); + dnsServer.processNextRequest(); + + // if (chos == 0) { + // connectNewWifi(); + + // chos++; + + // } + + Netshare(); + unsigned long currentMillis = 0; + buttonState = digitalRead(buttonPin); // 读取按钮状态 + // 按钮按下时,计数器加1 + if (buttonState == LOW) { + currentMillis = millis(); // 获取当前时间 + delay(500); // 延时去抖动 + counter++; + if (counter > 5) { + counter = 0; // 计数器超过2时,重置为0 + } + } + if (buttonState == HIGH) { + if (millis() - currentMillis < 3000) {// 获取当前时间 + delay(500); // 延时去抖动 + counter++; + if (counter > 5) { + counter = 0; // 计数器超过2时,重置为0 + } + } + } + //WifiConnect(); + Serial.println("connect"); + if (numwifi != 0) { + + } + else { + if (counter == 0) { + + frist(); + } + else if (counter == 1) { + second(); + } + else if (counter == 2) { + third(); + + } + else if (counter == 3) { + fourth(); + } + else if (counter == 4) { + fifth(); + } + else if (counter == 5) { + six(); + } + Serial.println(counter); //输出计数器数值 + } + */ +} + +//---------------------------开机LOGO--------------------------------------------- +void open() { + display.begin(0x3C, true); //初始化OLED并设置其IIC地址为 0x3C + display.clearDisplay(); //清屏 + delay(200); + display.setTextSize(1.3); + display.setTextColor(SH110X_WHITE); + display.setCursor(0, 0); //设置光标的位置 + display.drawBitmap(0, 0, hand_128x64, 128, 64, SH110X_WHITE);//开机LOGO + display.display(); + delay(5000); +} +//---------------------------拟人表情(自动模式)--------------------------------------------- +void frist() { + int Hours = timeClient.getHours(); + if (Hours > 19 || Hours < 7) { + if (AUTOst == 1) { + digitalWrite(LED, HIGH); + LEDst = 1; + } + } + else { + if (AUTOst == 1) { + digitalWrite(LED, LOW); + LEDst = 0; + } + + } + sensors_event_t humidity, temp; + aht.getEvent(&humidity, &temp);// populate temp and humidity objects with fresh data + if (temp.temperature < 15 && humidity.relative_humidity > 40) { + if (AUTOst == 1) {//自动模式开启时启动 + digitalWrite(HOT, HIGH); + HOTst = 1; + } + + } + else { + if (AUTOst == 1) { + digitalWrite(HOT, LOW); + HOTst = 0; + } + + } + display.setTextSize(1.3); + display.setTextColor(SH110X_WHITE); + display.setCursor(0, 0); //设置光标的位置 + float HUMI = (M0 - analogRead(PIN_AO)) / ((M0 - M1) / 100); //?????????????????????????????????????????? + //float HUMI2 = (M0 - analogRead(led2)) / ((M0 - M1) / 100); //???????????????????????????????????????????? + // int x = analogRead(led2); + // Serial.print("HOT= "); + // Serial.print(HOTst); + // Serial.print(AUTOst); + //Serial.print(x); + if (HUMI > 100.00) { + HUMI = 100;//土壤湿度 + } + if (HUMI > 45) { //测试认为,浇水后土壤湿度在50-55上下 + display.clearDisplay(); + display.drawBitmap(0, 0, bmp4, 128, 64, SH110X_WHITE);//0-0 + display.display(); + if (AUTOst == 1) { + PUMPst = 0; + LEDst = 0; + digitalWrite(Pump, LOW); + digitalWrite(LED, LOW); + } + + } + else { + display.clearDisplay(); + display.drawBitmap(0, 0, bmp1, 128, 64, SH110X_WHITE);//X-X + display.display(); + if (AUTOst == 1) { + digitalWrite(Pump, HIGH);//开启水泵电机 + //digitalWrite(LED,HIGH); + PUMPst = 1; + } + + + } + // if (HUMI2 > 100.00) { + // HUMI2 = 100;//光亮强度 + // } + //if (HUMI2 > 35) { + // digitalWrite(LED, LOW);//控制灯光关闭 + // } + // else { + // digitalWrite(LED, HIGH); + // } +} +//---------------------------信息屏幕--------------------------------------------- +void second() { + //float h = dht.readHumidity();//读取湿度 + // float t = dht.readTemperature();//读取温度 + // display.print(" SSD Temp: "); display.print(temp.temperature); display.println(" C"); + //display.print(" SSD Hum: "); display.print(humidity.relative_humidity); display.println(" %"); + sensors_event_t humidity, temp; + aht.getEvent(&humidity, &temp);// populate temp and humidity objects with fresh data + if (temp.temperature < 15 && humidity.relative_humidity > 40) { + if (AUTOst == 1) { + digitalWrite(HOT, HIGH); + HOTst = 1; + } + + } + else { + if (AUTOst == 1) { + digitalWrite(HOT, LOW); + HOTst = 0; + } + + } + Serial.print("Humidity????");//?????? + Serial.print(temp.temperature); + Serial.println("%"); + Serial.print("Temperatrue????");//?????? + Serial.print(humidity.relative_humidity); + //Serial.print(analogRead(led2)); + Serial.println("C"); + display.clearDisplay(); + // delay(200); + display.setTextSize(1.3); + display.setTextColor(SH110X_WHITE); + display.setCursor(0, 0); //设置光标 + // float HUMI2 =analogRead(led2); + float HUMI = (M0 - analogRead(PIN_AO)) / ((M0 - M1) / 100);// 使用公式计算湿度:(M0 - analogRead(PIN_AO)) / ((M0 - M1) / 100) + //float HUMI2 = (M0 - analogRead(led2)) / ((M0 - M1) / 100); //?????????????????????????????????????????? + if (HUMI > 100.00) { + HUMI = 100; + } + if (HUMI > 80) { + if (AUTOst == 1) { + digitalWrite(Pump, LOW); + PUMPst = 0; + } + + + } + else { + if (AUTOst == 1) { + digitalWrite(Pump, HIGH); + PUMPst = 1; + } + + + } + // if (HUMI2 > 100.00) { + // HUMI2 = 100; + // } + // if (HUMI2 > 35) { + // digitalWrite(LED, LOW); + // } + //else { + // digitalWrite(LED, HIGH); + // } + Serial.print("HUMI= "); + // Serial.print(HUMI2); + Serial.println("% "); + display.println("------Flowerpot------"); + display.drawBitmap(0, 7, wen, 16, 16, SH110X_WHITE); + display.drawBitmap(20, 7, du, 16, 16, SH110X_WHITE); + display.drawBitmap(40, 7, maohao, 16, 16, SH110X_WHITE); + display.println("");//温度 + display.print(" "); + display.print(temp.temperature); + display.println("C"); + display.drawBitmap(0, 27, shi, 16, 16, SH110X_WHITE); + display.drawBitmap(20, 27, du, 16, 16, SH110X_WHITE); + display.drawBitmap(40, 27, maohao, 16, 16, SH110X_WHITE); + display.println("");//湿度 + display.print(" ");//布局 + display.print(humidity.relative_humidity); + display.println("%"); + display.println("");//?????? + display.println("");//?????? + display.drawBitmap(0, 47, tu, 16, 16, SH110X_WHITE); + display.drawBitmap(20, 47, rang, 16, 16, SH110X_WHITE); + display.drawBitmap(40, 47, shi, 16, 16, SH110X_WHITE); + display.drawBitmap(60, 47, du, 16, 16, SH110X_WHITE); + display.drawBitmap(80, 47, maohao, 16, 16, SH110X_WHITE); + display.print(" ");//土壤湿度 + Serial.println("light"); + display.println(HUMI); + display.display(); + +} +//---------------------------手动浇水模式(关闭所有自动程序)--------------------------------------------- +void third() { + display.clearDisplay(); //清屏 + display.setTextSize(1.3); + display.setTextColor(SH110X_WHITE); + display.setCursor(0, 0); //设置光标的位置 + + digitalWrite(Pump, LOW); + digitalWrite(LED, LOW); + display.println("-------Warning-------"); + display.drawBitmap(5, 10, shou, 16, 16, SH110X_WHITE); + display.drawBitmap(25, 10, dong, 16, 16, SH110X_WHITE); + display.drawBitmap(45, 10, jiao, 16, 16, SH110X_WHITE); + display.drawBitmap(65, 10, shui, 16, 16, SH110X_WHITE); + display.drawBitmap(85, 10, mo, 16, 16, SH110X_WHITE); + display.drawBitmap(105, 10, shi2, 16, 16, SH110X_WHITE); + display.println("| |"); + display.println("| |"); + display.println("| |"); + display.println("| |"); + display.println("|All programs have |"); + display.println("|been closed for you|"); + display.println("---------P 2---------"); + display.display(); +} +//---------------------------配网模式--------------------------------------------- +void fourth() { + display.clearDisplay(); //清屏 + delay(200); + display.setTextSize(1.3); + display.setTextColor(SH110X_WHITE); + display.setCursor(0, 0); //设置光标位置 + + digitalWrite(Pump, LOW); + digitalWrite(LED, LOW); + display.println("-----WIFI Connect----"); + display.println("| |"); + display.drawBitmap(5, 10, wang, 16, 16, SH110X_WHITE); + display.drawBitmap(25, 10, luo, 16, 16, SH110X_WHITE); + display.drawBitmap(45, 10, pei, 16, 16, SH110X_WHITE); + display.drawBitmap(65, 10, dui, 16, 16, SH110X_WHITE); + display.drawBitmap(85, 10, mo, 16, 16, SH110X_WHITE); + display.drawBitmap(105, 10, shi2, 16, 16, SH110X_WHITE); + display.println("| |"); + display.println("| |"); + display.println("Password: 12345678"); + display.display(); + +} +//---------------------------系统信息--------------------------------------------- +void fifth() { + display.clearDisplay(); //清屏 + delay(200); + display.setTextSize(1.3); + display.setTextColor(SH110X_WHITE); + display.setCursor(0, 0); //设置光标的位置 + String chipIdString = String(); + chipIdString += (uint32_t)(chipId >> 32); + chipIdString += (uint32_t)chipId; + chipIdString = chipIdString.substring(1); + digitalWrite(Pump, LOW); + digitalWrite(LED, LOW); + display.println("-----Flowerpot OS----"); + display.println("|FlowerpotOS| " + LocalVersion + "|"); + display.println("|CPU |ESP8266|"); + display.println("|Storage | 4MB|"); + display.println("|Firmware | V5.5|"); + display.println("|ID: fp" + chipIdString + "|"); + display.print("|IP "); + display.print(WiFi.localIP()); + display.println("|"); + display.println("---------P 4---------"); + display.display(); +} +//-----------------------系统更新界面--------------------------------------- + +void six() { + if (updst == 0) { + updatainfo(); + } + if (LocalVersion.equals(NewVersion)) { + UPst = " No Update! "; + + } + else { + + UPst = " New Version! "; + } + display.clearDisplay(); //清屏 + delay(200); + display.setTextSize(1.3); + display.setTextColor(SH110X_WHITE); + display.setCursor(0, 0); //设置光标的位置 + + digitalWrite(Pump, LOW); + digitalWrite(LED, LOW); + display.println("--------Update-------"); + display.println("| |"); + display.println("| " + UPst + " |"); + // 假设这里获取到了芯片的ID + + // 将chipId转换为String类型 + // String chipIdString = String(chipId); + display.println("| |"); + display.println("|-------------------|"); + display.println("|LocalVersion|" + LocalVersion + " | "); + display.println("|New Version|" + NewVersion + " | "); + display.println("---------P 5---------"); + display.display(); +} +void Updata() { + // ledstatus = "on"; + Serial.println("Updata!"); + // digitalWrite(B_led, LOW); + updateBin(); +} +//关闭灯泡 +void OffLed() { + // ledstatus = "off"; + Serial.println("turn off light"); + // digitalWrite(B_led, HIGH); + digitalWrite(LED, LOW); + LEDst = 0; +} +void ONLed() { + // ledstatus = "off"; + Serial.println("turn on light"); + // digitalWrite(B_led, HIGH); + digitalWrite(LED, HIGH); + LEDst = 1; +} +void OFFHOT() { + // ledstatus = "off"; + Serial.println("turn off HOT"); + // digitalWrite(B_led, HIGH); + digitalWrite(HOT, LOW); + HOTst = 0; +} +void ONHOT() { + // ledstatus = "off"; + Serial.println("turn on HOT"); + // digitalWrite(B_led, HIGH); + digitalWrite(HOT, HIGH); + HOTst = 1; +} +void OFFPUMP() { + // ledstatus = "off"; + Serial.println("turn off PUMP"); + // digitalWrite(B_led, HIGH); + digitalWrite(Pump, LOW); + PUMPst = 0; +} +void ONPUMP() { + // ledstatus = "off"; + Serial.println("turn on PUMP"); + // digitalWrite(B_led, HIGH); + digitalWrite(Pump, HIGH); + PUMPst = 1; +} +void ONAUTO() { + // ledstatus = "off"; + Serial.println("turn on AUTO"); + // digitalWrite(B_led, HIGH); + AUTOst = 1; +} +void OFFAUTO() { + // ledstatus = "off"; + Serial.println("turn off AUTO"); + // digitalWrite(B_led, HIGH); + digitalWrite(Pump, HIGH); + AUTOst = 0; +} +unsigned long connectInterval = 60000; // 连接Wi-Fi的间隔时间,单位为毫秒 +unsigned long previousConnectMillis = 0; // 上一次尝试连接的时间 + + +// 转换为字符串 +std::string uint64ToString(uint64_t num) { + std::stringstream ss; + ss << num; + return ss.str(); +} +std::string appendIntToString(int intValue) { + // 将整型数字转换为字符串 + std::stringstream ss; + + // 将整型数字写入 stringstream + ss << intValue; + + // 将 stringstream 转换为字符串 + std::string intString = ss.str(); + + // 拼接字符串 + std::string message = intString; + + + return message; +} +std::string appendFloatToString(float floatValue) { + // 将浮点数转换为字符串 + if (floatValue < 0 || floatValue > 100) { + return "0"; + } + + // 将浮点数转换为字符串 + std::stringstream ss; + ss << std::fixed << std::setprecision(2) << floatValue; + std::string floatString = ss.str(); + + // 拼接字符串 + std::string message = floatString; + + return message; +} +//int wifimqttfirst=0; +void Netshare() {//矛盾点,建议加入WIFI连通性验证已启用MQTT + unsigned long currentMillis3 = millis(); // 获取当前时间 + + // 检查是否到了连接Wi-Fi的时间间隔 + if (client.connected()) { + // 连接成功 + // wifimqttfirst++; + // 在这里执行连接成功的任务 + // Serial.println("Failed to connect!!!!!!!!"); + client.loop(); + + long now = millis();//获取当前时间戳 + if (now - lastMsg > timeval) {//如果达到3s,进行数据上传 + lastMsg = now; + sensors_event_t humidity, temp; + aht.getEvent(&humidity, &temp);// populate temp and humidity objects with fresh data + // Serial.print("Humidity????");//?????? + Serial.print(temp.temperature);//发送有问题,需要聚合函数值!!! + Serial.println("%"); + // Serial.print("Temperatrue????");//?????? + Serial.print(humidity.relative_humidity); + float tempss = temp.temperature; + float humdss = humidity.relative_humidity; + std::string TEMP = appendFloatToString(tempss); + std::string HUMD = appendFloatToString(humdss); + + // Serial.println(" as "); + // 获取芯片 ID + + + // 打印芯片 ID + + + // 转换为字符串 + std::string strNumber = uint64ToString(chipId); + std::string LocalVersionintsst = appendIntToString(LocalVersionint); + std::string HOTsst = appendIntToString(HOTst); + std::string LEDsst = appendIntToString(LEDst); + std::string PUMPsst = appendIntToString(PUMPst); + std::string autosst = appendIntToString(AUTOst); + float HUMI = (M0 - analogRead(PIN_AO)) / ((M0 - M1) / 100); + std::string HUMIs = appendFloatToString(HUMI); + // 拼接字符串 + std::string msg = "#ID" + strNumber + "#" + TEMP + "#" + HUMD + "#" + HUMIs + "#" + PUMPsst + "#" + HOTsst + "#" + LEDsst + "#" + LocalVersionintsst + "#" + autosst; + // + "#" + LIGHT待实现(光强紫外线识别)(ChatGPT AI自动化)(AI生长趋势检测) + + // 打印消息 + std::cout << msg << std::endl; + client.publish(topic.c_str(), msg.c_str());//数据上传 + Serial.println(msg.c_str()); + } + + + } + else { + Serial.println("netshare else"); + if (currentMillis3 - previousConnectMillis >= connectInterval) { + previousConnectMillis = currentMillis3; // 更新上一次尝试连接的时间 + Serial.println("Fatasdt"); + // 尝试连接Wi-Fi网络 + if (client.connected()) { + // 连接成功 + // 在这里执行连接成功的任务 + Serial.println("Failed to connec22222222222t"); + client.loop(); + } + else { + // 连接失败 + // 在这里执行连接失败的任务 + Serial.println("Failed to connect"); + reconnect(); + } + } + + } +} +/* +unsigned long pressStartTime = 0; // 记录长按开始时间 +unsigned long pressDuration = 5000; // 长按持续时间,单位为毫秒 + +void WifiConnect() { + if (digitalRead(buttonPin) == LOW) { + // 如果按钮刚刚被按下,记录开始时间 + if (pressStartTime == 0) { + pressStartTime = millis(); + numwifi = numwifi + 1; + display.clearDisplay(); + display.setRotation(0); + display.setTextSize(1); + display.setTextColor(SH110X_WHITE); + display.setCursor(0, 0); + + display.println("------WIFI Reset-----"); + display.println("| |"); + display.println("| Please press |"); + // 假设这里获取到了芯片的ID + + // 将chipId转换为String类型 + // String chipIdString = String(chipId); + display.println("| |"); + display.println("|-------------------|"); + display.println("|LocalVersion|" + LocalVersion + " | "); + display.println("|New Version|" + NewVersion + " | "); + display.println("---------P 5---------"); + display.display(); + } + + + // 检查按钮是否被长按 + if (millis() - pressStartTime >= pressDuration) { + // 长按时间已达到指定时间,执行相应的代码 + executeAfterLongPress(); + + // 重置开始时间,以允许下一次长按触发 + pressStartTime = 0; + numwifi = 0; + } + } + else { + // 按钮没有被按下,重置开始时间 + pressStartTime = 0; + numwifi = 0; + } +} + +void executeAfterLongPress() { + // 在这里执行长按后的任务 + // 例如执行millis()函数和其他代码 + + Serial.println("test"); + + // 在这里实现你想要执行的任务代码 + // 这部分代码每隔60秒就会被触发执行 + WiFi.mode(WIFI_STA); // 设置模式,esp默认为STA+AP + WiFiManager wm; //定义manager对象 + bool res; + + res = wm.autoConnect("YANG-SSD", "12345678"); //定义ap名称和密码 + + if (!res) { + Serial.println("Connected was... OK"); + Serial.println("Failed to connec22222222222t"); + } + else { + //if you get here you have connected to the WiFi + Serial.println("Connected was... OK"); + Serial.println("Fc22222222222t"); + + + } + + + // 在这里实现长按后的逻辑 +} +*/ +//升级状态记录 + +//当升级开始时,打印日志 +void update_started() { + Serial.println("CALLBACK: HTTP update process started"); + UPst = " Updata start! "; +} + +//当升级结束时,打印日志 +void update_finished() { + Serial.println("CALLBACK: HTTP update process finished"); + UPst = "Update succeed!"; +} + +//当升级中,打印日志 +void update_progress(int cur, int total) { + Serial.printf("CALLBACK: HTTP update process at %d of %d bytes...\n", cur, total); + UPst = " Updating! "; +} + +//当升级失败时,打印日志 +void update_error(int err) { + Serial.printf("CALLBACK: HTTP update fatal error code %d\n", err); + UPst = "Update failed! "; +} + + +/** + * 固件升级函数 + * 在需要升级的地方,加上这个函数即可,例如setup中加的updateBin(); + * 原理:通过http请求获取远程固件,实现升级 + */ +void updateBin() { + WiFiClient UpdateClient; + ESPhttpUpdate.onStart(update_started);//当升级开始时 + ESPhttpUpdate.onEnd(update_finished); //当升级结束时 + ESPhttpUpdate.onProgress(update_progress); //当升级中 + ESPhttpUpdate.onError(update_error); //当升级失败时 + + t_httpUpdate_return ret = ESPhttpUpdate.update(UpdateClient, upUrl); + switch (ret) { + case HTTP_UPDATE_FAILED: //当升级失败 + Serial.println("Update failed"); + UPst = "Update failed! "; + break; + case HTTP_UPDATE_NO_UPDATES: //当无升级 + Serial.println("No Update"); + UPst = " No Update! "; + break; + case HTTP_UPDATE_OK: //当升级成功 + Serial.println("Update Ok"); + UPst = " Update Ok! "; + break; + } +} + +void updatainfo() { + String url = "https://apis.jxcxin.cn/api/qqcollection?url=https://sharechain.qq.com/fc921df52dff5ae9417ed753b417168e"; + if (WiFi.status() == WL_CONNECTED) { + WiFiClientSecure client; + client.setInsecure(); // Do not verify certificate + HTTPClient https; + https.begin(client, url); + int httpCode = https.GET(); + if (httpCode > 0) { + String payload = https.getString(); + Serial.println(payload); + Serial.println(""); + // 重点1:即将解析的json文件 + String json = payload; + Serial.println(String("") + "JSON大小:" + json.length()); + // 重点2:解析的JSON数据大小 + DynamicJsonDocument doc(json.length() * 2); //解析的JSON数据大小 + + + // 重点3:反序列化数据 + deserializeJson(doc, json); + + // 重点4:获取解析后的数据信息 + String nameStr = doc["data"]["content"].as(); + + // int numberInt = doc["time"].as(); + // en = nameStr; + NewVersion = nameStr.substring(0, 6); + + //Serial.print("errnoInt = ");Serial.println(numberInt); + + } + https.end(); + } + updst = 1; +} \ No newline at end of file diff --git a/FlowerpotOS3.1/src/picture.cpp b/FlowerpotOS3.1/src/picture.cpp new file mode 100644 index 0000000..d789463 --- /dev/null +++ b/FlowerpotOS3.1/src/picture.cpp @@ -0,0 +1,294 @@ +// +// +// + +#include "picture.h" + +static const unsigned char PROGMEM wen[] = { + +0x00,0x00,0x23,0xF8,0x12,0x08,0x12,0x08,0x83,0xF8,0x42,0x08,0x42,0x08,0x13,0xF8, +0x10,0x00,0x27,0xFC,0xE4,0xA4,0x24,0xA4,0x24,0xA4,0x24,0xA4,0x2F,0xFE,0x00,0x00 };/*"",0};*/ +/* (12 X 12 , )*/ + +static const unsigned char PROGMEM du[] = { + /* (16 X 16 , )*/ + + 0x01,0x00,0x00,0x80,0x3F,0xFE,0x22,0x20,0x22,0x20,0x3F,0xFC,0x22,0x20,0x22,0x20, + 0x23,0xE0,0x20,0x00,0x2F,0xF0,0x24,0x10,0x42,0x20,0x41,0xC0,0x86,0x30,0x38,0x0E };/*"",1};*/ +/* (12 X 12 , )*/ + +static const unsigned char PROGMEM shi[] = { +0x00,0x00,0x27,0xF8,0x14,0x08,0x14,0x08,0x87,0xF8,0x44,0x08,0x44,0x08,0x17,0xF8, +0x11,0x20,0x21,0x20,0xE9,0x24,0x25,0x28,0x23,0x30,0x21,0x20,0x2F,0xFE,0x00,0x00 };/*"ʪ",2};*/ +/* (12 X 12 , )*/ + +/* (12 X 12 , )*/ +static const unsigned char PROGMEM tu[] = { +0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x3F,0xF8,0x01,0x00, +0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0xFF,0xFE,0x00,0x00 };/*"",4};*/ +/* (12 X 12 , )*/ +static const unsigned char PROGMEM rang[] = { +0x20,0x40,0x27,0xFC,0x20,0x00,0x23,0xB8,0xF2,0xA8,0x23,0xB8,0x21,0x10,0x27,0xFC, +0x21,0x10,0x27,0xFC,0x31,0x10,0xEF,0xFE,0x41,0x28,0x03,0x10,0x0D,0x48,0x01,0x86 };/*"",5};*/ +/* (12 X 12 , )*/ +static const unsigned char PROGMEM maohao[] = { +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00 };/*"",6};*/ +/* (12 X 12 , )*/ +static const unsigned char PROGMEM shou[] = { +0x00,0x10,0x00,0xF8,0x3F,0x00,0x01,0x00,0x01,0x00,0x3F,0xF8,0x01,0x00,0x01,0x00, +0x01,0x00,0xFF,0xFE,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x05,0x00,0x02,0x00 };/*"",0};*/ +/* (16 X 16 , )*/ +static const unsigned char PROGMEM dong[] = { +0x00,0x40,0x00,0x40,0x7C,0x40,0x00,0x40,0x01,0xFC,0x00,0x44,0xFE,0x44,0x20,0x44, +0x20,0x44,0x20,0x84,0x48,0x84,0x44,0x84,0xFD,0x04,0x45,0x04,0x02,0x28,0x04,0x10 };/*"",1};*/ +/* (16 X 16 , )*/ +static const unsigned char PROGMEM jiao[] = { +0x00,0x80,0x20,0x80,0x10,0xBC,0x13,0xC0,0x80,0x50,0x40,0x24,0x48,0xD4,0x0B,0x0C, +0x10,0x00,0x17,0xFE,0xE0,0x90,0x20,0x90,0x21,0x12,0x21,0x12,0x22,0x0E,0x04,0x00 };/*"",2};*/ +/* (16 X 16 , )*/ +static const unsigned char PROGMEM shui[] = { +0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x08,0x01,0x08,0x7D,0x90,0x05,0xA0,0x09,0x40, +0x09,0x40,0x11,0x20,0x11,0x10,0x21,0x08,0x41,0x06,0x81,0x00,0x05,0x00,0x02,0x00 };/*"ˮ",3};*/ +/* (16 X 16 , )*/ + +/* (16 X 16 , )*/ +static const unsigned char PROGMEM mo[] = { +0x11,0x10,0x11,0x10,0x17,0xFC,0x11,0x10,0xFC,0x00,0x13,0xF8,0x32,0x08,0x3B,0xF8, +0x56,0x08,0x53,0xF8,0x90,0x40,0x17,0xFC,0x10,0xA0,0x11,0x10,0x12,0x08,0x14,0x06 };/*"ģ",6};*/ +/* (16 X 16 , )*/ +static const unsigned char PROGMEM shi2[] = { +0x00,0x48,0x00,0x44,0x00,0x44,0x00,0x40,0xFF,0xFE,0x00,0x40,0x00,0x40,0x3E,0x40, +0x08,0x40,0x08,0x40,0x08,0x20,0x08,0x22,0x0F,0x12,0x78,0x0A,0x20,0x06,0x00,0x02 };/*"ʽ",7};*/ +/* (16 X 16 , )*/ +static const unsigned char PROGMEM wang[] = { +0x00,0x00,0x7F,0xFC,0x40,0x04,0x40,0x04,0x42,0x14,0x52,0x94,0x4A,0x54,0x44,0x24, +0x44,0x24,0x4A,0x54,0x4A,0x54,0x52,0x94,0x61,0x04,0x40,0x04,0x40,0x14,0x40,0x08 };/*"",0};*/ +/* (16 X 16 , )*/ +static const unsigned char PROGMEM luo[] = { +0x10,0x80,0x10,0x80,0x20,0xF8,0x21,0x08,0x4B,0x10,0xFC,0xA0,0x10,0x40,0x20,0xA0, +0x41,0x18,0xFA,0x06,0x45,0xF8,0x01,0x08,0x19,0x08,0xE1,0x08,0x41,0xF8,0x01,0x08 };/*"",1};*/ +/* (16 X 16 , )*/ +static const unsigned char PROGMEM pei[] = { +0x00,0x00,0xFE,0x00,0x28,0xF8,0x28,0x08,0xFE,0x08,0xAA,0x08,0xAA,0x08,0xAA,0xF8, +0xAE,0x88,0xC2,0x80,0x82,0x80,0xFE,0x80,0x82,0x82,0x82,0x82,0xFE,0x7E,0x82,0x00 };/*"",2};*/ +/* (16 X 16 , )*/ +static const unsigned char PROGMEM dui[] = { +0x00,0x10,0x00,0x10,0x00,0x10,0x7E,0x10,0x02,0xFE,0x02,0x10,0x24,0x10,0x14,0x90, +0x08,0x50,0x08,0x50,0x14,0x10,0x12,0x10,0x22,0x10,0x40,0x10,0x00,0x50,0x00,0x20 };/*"",3};*/ +/* (16 X 16 , )*/ + +/* (16 X 16 , )*/ + +/* (12 X 12 , )*/ + +/* (6 X 12 , )*/ + +static const unsigned char PROGMEM bmp1[] = { +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x07,0x80,0x00,0x78,0x00,0x00,0x00,0x00,0x1E,0x00,0x01,0xE0,0x00,0x00, +0x00,0x00,0x0F,0xC0,0x00,0xFC,0x00,0x00,0x00,0x00,0x3F,0x00,0x03,0xF0,0x00,0x00, +0x00,0x00,0x1F,0xE0,0x01,0xFE,0x00,0x00,0x00,0x00,0x7F,0x80,0x07,0xF8,0x00,0x00, +0x00,0x00,0x3F,0xF0,0x03,0xFF,0x00,0x00,0x00,0x00,0xFF,0xC0,0x0F,0xFC,0x00,0x00, +0x00,0x00,0x3F,0xF8,0x07,0xFF,0x00,0x00,0x00,0x00,0xFF,0xE0,0x1F,0xFC,0x00,0x00, +0x00,0x00,0x3F,0xFC,0x0F,0xFF,0x00,0x00,0x00,0x00,0xFF,0xF0,0x3F,0xFC,0x00,0x00, +0x00,0x00,0x3F,0xFE,0x1F,0xFF,0x00,0x00,0x00,0x00,0xFF,0xF8,0x7F,0xFC,0x00,0x00, +0x00,0x00,0x1F,0xFF,0x3F,0xFE,0x00,0x00,0x00,0x00,0x7F,0xFC,0xFF,0xF8,0x00,0x00, +0x00,0x00,0x0F,0xFF,0xFF,0xFC,0x00,0x00,0x00,0x00,0x3F,0xFF,0xFF,0xF0,0x00,0x00, +0x00,0x00,0x07,0xFF,0xFF,0xF8,0x00,0x00,0x00,0x00,0x1F,0xFF,0xFF,0xE0,0x00,0x00, +0x00,0x00,0x03,0xFF,0xFF,0xF0,0x00,0x00,0x00,0x00,0x0F,0xFF,0xFF,0xC0,0x00,0x00, +0x00,0x00,0x01,0xFF,0xFF,0xE0,0x00,0x00,0x00,0x00,0x07,0xFF,0xFF,0x80,0x00,0x00, +0x00,0x00,0x00,0xFF,0xFF,0xC0,0x00,0x00,0x00,0x00,0x03,0xFF,0xFF,0x00,0x00,0x00, +0x00,0x00,0x00,0x7F,0xFF,0x80,0x00,0x00,0x00,0x00,0x01,0xFF,0xFE,0x00,0x00,0x00, +0x00,0x00,0x00,0x3F,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFC,0x00,0x00,0x00, +0x00,0x00,0x00,0x3F,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFC,0x00,0x00,0x00, +0x00,0x00,0x00,0x7F,0xFF,0x80,0x00,0x00,0x00,0x00,0x01,0xFF,0xFE,0x00,0x00,0x00, +0x00,0x00,0x00,0xFF,0xFF,0xC0,0x00,0x00,0x00,0x00,0x03,0xFF,0xFF,0x00,0x00,0x00, +0x00,0x00,0x01,0xFF,0xFF,0xE0,0x00,0x00,0x00,0x00,0x07,0xFF,0xFF,0x80,0x00,0x00, +0x00,0x00,0x03,0xFF,0xFF,0xF0,0x00,0x00,0x00,0x00,0x0F,0xFF,0xFF,0xC0,0x00,0x00, +0x00,0x00,0x07,0xFF,0xFF,0xF8,0x00,0x00,0x00,0x00,0x1F,0xFF,0xFF,0xE0,0x00,0x00, +0x00,0x00,0x0F,0xFF,0xFF,0xFC,0x00,0x00,0x00,0x00,0x3F,0xFF,0xFF,0xF0,0x00,0x00, +0x00,0x00,0x1F,0xFF,0x3F,0xFE,0x00,0x00,0x00,0x00,0x7F,0xFC,0xFF,0xF8,0x00,0x00, +0x00,0x00,0x3F,0xFE,0x1F,0xFF,0x00,0x00,0x00,0x00,0xFF,0xF8,0x7F,0xFC,0x00,0x00, +0x00,0x00,0x3F,0xFC,0x0F,0xFF,0x00,0x00,0x00,0x00,0xFF,0xF0,0x3F,0xFC,0x00,0x00, +0x00,0x00,0x3F,0xF8,0x07,0xFF,0x00,0x00,0x00,0x00,0xFF,0xE0,0x1F,0xFC,0x00,0x00, +0x00,0x00,0x3F,0xF0,0x03,0xFF,0x00,0x00,0x00,0x00,0xFF,0xC0,0x0F,0xFC,0x00,0x00, +0x00,0x00,0x1F,0xE0,0x01,0xFE,0x00,0x00,0x00,0x00,0x7F,0x80,0x07,0xF8,0x00,0x00, +0x00,0x00,0x0F,0xC0,0x00,0xFC,0x00,0x00,0x00,0x00,0x3F,0x00,0x03,0xF0,0x00,0x00, +0x00,0x00,0x07,0x80,0x00,0x78,0x00,0x00,0x00,0x00,0x1E,0x00,0x01,0xE0,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"C:\Users\qw200\Desktop\΢ͼƬ_20230320215131.bmp",0*/ +/* (128 X 64 )*/ +/* (128 X 64 )*/ + +/*"C:\Users\qw200\Desktop\img\hua_01.bmp",0*/ +/* (128 X 64 )*/ }; + + +static const unsigned char PROGMEM bmp4[] = { + +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x01,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x80,0x00,0x00,0x00, +0x00,0x00,0x00,0x03,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xC0,0x00,0x00,0x00, +0x00,0x00,0x00,0x07,0xFF,0x80,0x00,0x00,0x00,0x00,0x01,0xFF,0xE0,0x00,0x00,0x00, +0x00,0x00,0x00,0x0F,0xFF,0xC0,0x00,0x00,0x00,0x00,0x03,0xFF,0xF0,0x00,0x00,0x00, +0x00,0x00,0x00,0x0F,0xFF,0xC0,0x00,0x00,0x00,0x00,0x03,0xFF,0xF0,0x00,0x00,0x00, +0x00,0x00,0x00,0x1F,0xFF,0xE0,0x00,0x00,0x00,0x00,0x07,0xFF,0xF8,0x00,0x00,0x00, +0x00,0x00,0x00,0x1F,0xFF,0xE0,0x00,0x00,0x00,0x00,0x07,0xFF,0xF8,0x00,0x00,0x00, +0x00,0x00,0x00,0x1F,0xFF,0xE0,0x00,0x00,0x00,0x00,0x07,0xFF,0xF8,0x00,0x00,0x00, +0x00,0x00,0x00,0x1F,0xFF,0xE0,0x00,0x00,0x00,0x00,0x07,0xFF,0xF8,0x00,0x00,0x00, +0x00,0x00,0x00,0x1F,0xFF,0xE0,0x00,0x00,0x00,0x00,0x07,0xFF,0xF8,0x00,0x00,0x00, +0x00,0x00,0x00,0x1F,0xFF,0xE0,0x00,0x00,0x00,0x00,0x07,0xFF,0xF8,0x00,0x00,0x00, +0x00,0x00,0x00,0x1F,0xFF,0xE0,0x00,0x00,0x00,0x00,0x07,0xFF,0xF8,0x00,0x00,0x00, +0x00,0x00,0x00,0x1F,0xFF,0xE0,0x00,0x00,0x00,0x00,0x07,0xFF,0xF8,0x00,0x00,0x00, +0x00,0x00,0x00,0x1F,0xFF,0xE0,0x00,0x00,0x00,0x00,0x07,0xFF,0xF8,0x00,0x00,0x00, +0x00,0x00,0x00,0x1F,0xFF,0xE0,0x00,0x00,0x00,0x00,0x07,0xFF,0xF8,0x00,0x00,0x00, +0x00,0x00,0x00,0x1F,0xFF,0xE0,0x00,0x00,0x00,0x00,0x07,0xFF,0xF8,0x00,0x00,0x00, +0x00,0x00,0x00,0x1F,0xFF,0xE0,0x00,0x00,0x00,0x00,0x07,0xFF,0xF8,0x00,0x00,0x00, +0x00,0x00,0x00,0x1F,0xFF,0xE0,0x00,0x00,0x00,0x00,0x07,0xFF,0xF8,0x00,0x00,0x00, +0x00,0x00,0x00,0x1F,0xFF,0xE0,0x00,0x00,0x00,0x00,0x07,0xFF,0xF8,0x00,0x00,0x00, +0x00,0x00,0x00,0x1F,0xFF,0xE0,0x00,0x00,0x00,0x00,0x07,0xFF,0xF8,0x00,0x00,0x00, +0x00,0x00,0x00,0x1F,0xFF,0xE0,0x00,0x00,0x00,0x00,0x07,0xFF,0xF8,0x00,0x00,0x00, +0x00,0x00,0x00,0x1F,0xFF,0xE0,0x00,0x00,0x00,0x00,0x07,0xFF,0xF8,0x00,0x00,0x00, +0x00,0x00,0x00,0x1F,0xFF,0xE0,0x00,0x00,0x00,0x00,0x07,0xFF,0xF8,0x00,0x00,0x00, +0x00,0x00,0x00,0x1F,0xFF,0xE0,0x00,0x00,0x00,0x00,0x07,0xFF,0xF8,0x00,0x00,0x00, +0x00,0x00,0x00,0x1F,0xFF,0xE0,0x00,0x00,0x00,0x00,0x07,0xFF,0xF8,0x00,0x00,0x00, +0x00,0x00,0x00,0x0F,0xFF,0xC0,0x00,0x00,0x00,0x00,0x03,0xFF,0xF0,0x00,0x00,0x00, +0x00,0x00,0x00,0x0F,0xFF,0xC0,0x00,0x00,0x00,0x00,0x03,0xFF,0xF0,0x00,0x00,0x00, +0x00,0x00,0x00,0x07,0xFF,0x80,0x00,0x00,0x00,0x00,0x01,0xFF,0xE0,0x00,0x00,0x00, +0x00,0x00,0x00,0x03,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xC0,0x00,0x00,0x00, +0x00,0x00,0x00,0x01,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x80,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"C:\Users\qw200\Desktop\img\hua_01.bmp",0*/ +/* (128 X 64 )*/ };/*"C:\Users\qw200\Desktop\img\hua_04.bmp",0*/ +/* (128 X 64 )*/ +static const unsigned char PROGMEM hand_128x64[] = { +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x3F,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xFC, +0x3F,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xFC, +0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C, +0x36,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6C, +0x34,0x00,0x00,0x00,0x00,0x01,0xF8,0x00,0x00,0x1F,0x80,0x00,0x00,0x00,0x00,0x2C, +0x30,0x00,0x00,0x00,0x00,0x03,0xFE,0x00,0x00,0x7F,0xC0,0x00,0x00,0x00,0x00,0x0C, +0x30,0x00,0x00,0x00,0x00,0x07,0xFF,0x00,0x00,0xFF,0xE0,0x00,0x00,0x00,0x00,0x0C, +0x30,0x00,0x00,0x00,0x00,0x0F,0xFF,0xC0,0x03,0xFF,0xF0,0x00,0x00,0x00,0x00,0x0C, +0x20,0x00,0x00,0x00,0x00,0x0E,0x1F,0xE0,0x07,0xF8,0x70,0x00,0x00,0x00,0x00,0x04, +0x20,0x00,0x00,0x00,0x00,0x0F,0xE7,0xF0,0x0F,0xE7,0xF0,0x00,0x00,0x00,0x00,0x04, +0x20,0x00,0x00,0x00,0x00,0x0F,0xF9,0xF8,0x1F,0x9F,0xF0,0x00,0x00,0x00,0x00,0x04, +0x00,0x00,0x00,0x00,0x00,0x0F,0xFE,0x7C,0x3E,0x7F,0xF0,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x0F,0xFF,0xBE,0x7D,0xFF,0xF0,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x07,0xFF,0xDF,0x7B,0xFF,0xE0,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x03,0xFF,0xEE,0xF7,0xFF,0xC0,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFE,0xEF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xFD,0xDF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7D,0xDE,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1D,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0B,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFF,0xF0,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x1F,0xFF,0xFF,0xFF,0xFF,0xF8,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x1D,0x55,0x55,0x55,0x55,0x58,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x1A,0xAA,0xAA,0xAA,0xAA,0xB8,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x1F,0xFF,0xFF,0xFF,0xFF,0xF8,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFF,0xF0,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xC0,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xC0,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xC0,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xC0,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xC0,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x01,0xFF,0xFE,0x7F,0xFF,0x80,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x01,0xFF,0xFE,0x7F,0xFF,0x80,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x01,0xFF,0xFC,0x3F,0xFF,0x80,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x01,0xFF,0xFC,0x3F,0xFF,0x80,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x01,0xFF,0xF8,0x1F,0xFF,0x80,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xF8,0x1F,0xFF,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xF0,0x0F,0xFF,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xF0,0x0F,0xFF,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xE0,0x07,0xFF,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xE0,0x07,0xFF,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xE0,0x07,0xFE,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xE0,0x07,0xFE,0x00,0x00,0x00,0x00,0x00,0x04, +0x20,0x00,0x00,0x00,0x00,0x00,0x7F,0xF0,0x0F,0xFE,0x00,0x00,0x00,0x00,0x00,0x04, +0x20,0x00,0x00,0x00,0x00,0x00,0x3F,0xF8,0x1F,0xFC,0x00,0x00,0x00,0x00,0x00,0x04, +0x20,0x00,0x00,0x00,0x00,0x00,0x3F,0xFE,0x7F,0xFC,0x00,0x00,0x00,0x00,0x00,0x0C, +0x30,0x00,0x00,0x00,0x00,0x00,0x3F,0xFF,0xFF,0xFC,0x00,0x00,0x00,0x00,0x00,0x0C, +0x30,0x00,0x00,0x00,0x00,0x00,0x3F,0xFF,0xFF,0xFC,0x00,0x00,0x00,0x00,0x00,0x0C, +0x30,0x00,0x00,0x00,0x00,0x00,0x1F,0xFF,0xFF,0xF8,0x00,0x00,0x00,0x00,0x00,0x2C, +0x34,0x00,0x00,0x00,0x00,0x00,0x07,0xFF,0xFF,0xE0,0x00,0x00,0x00,0x00,0x00,0x6C, +0x36,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C, +0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xFC, +0x3F,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xFC, +0x3F,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +}; + + diff --git a/FlowerpotOS3.1/src/picture.h b/FlowerpotOS3.1/src/picture.h new file mode 100644 index 0000000..d48420f --- /dev/null +++ b/FlowerpotOS3.1/src/picture.h @@ -0,0 +1,14 @@ +// picture.h + +#ifndef _picture_h +#define _picture_h + +#if defined(ARDUINO) && ARDUINO >= 100 + #include "arduino.h" +#else + #include "WProgram.h" +#endif + + +#endif + diff --git a/FlowerpotOS3.1/test/README b/FlowerpotOS3.1/test/README new file mode 100644 index 0000000..b0416ad --- /dev/null +++ b/FlowerpotOS3.1/test/README @@ -0,0 +1,11 @@ + +This directory is intended for PlatformIO Test Runner and project tests. + +Unit Testing is a software testing method by which individual units of +source code, sets of one or more MCU program modules together with associated +control data, usage procedures, and operating procedures, are tested to +determine whether they are fit for use. Unit testing finds problems early +in the development cycle. + +More information about PlatformIO Unit Testing: +- https://docs.platformio.org/en/latest/advanced/unit-testing/index.html