- 博客(73)
- 资源 (1)
- 收藏
- 关注
原创 ESP8266驱动SG90舵机控制开关灯(灯的开关)的折腾记录
https://blog.csdn.net/qq_47749454/article/details/117638828想法来源地址在上面,可以去参考一下,建议是结合两篇文章一块看,按照大佬的先来折腾一次,有问题了在看我这个,会比较齐全。具体的折腾细节方面可以去上面的博主页面去参考,这里想聊一些那个博主没涉及到的。1.买的型号,SG90舵机,淘宝应该很多,和ESP8266的连线也是ok的,没有困难,连完线难题就开始了,首先舵机驱动并没有搞过,其次ESP8266也忘记的差不多了,然后,这个程序实际上还有另
2021-07-25 21:30:33 6517 19
原创 智能家居入坑记录
在网上看到别人都在用智能家居,朋友也给我了好些开发工具和电子元件让我玩,所以就想搞个智能家居系统,目标也很简单,在成本尽量控制的前提下完成一些场景的智能化,同时也尽量不去改造房子原有的器具,同时又要保证可以迁移走(租房住的,不太好搞换开关这些操作)。对我这个阶段来说,智能家居最便携的入口自然是语音助手,所以就一顿查,查下来小米家的小爱音箱是还算比较好的,所以就买了Redmi 小爱音箱Play,还可以做蓝牙mesh网关。同时也买了米家的空调伴侣2,可以用语音或手机控制空调,下班回家等电梯的时候开空调,也挺
2021-07-25 21:00:49 3622
原创 使用点灯科技Blinker来控制灯的demo程序
需要主意:1.在Blinker App上必须要首次点击设备详情才有详情页面,否则是没有的,#define BLINKER_WIFI#define BLINKER_WITHOUT_SSL#include <Blinker.h>char auth[] = "e8e23f9485d8";char ssid[] = "PDCN";char pswd[] = "13037679105";// 新建组件对象BlinkerButton Button1("btn-abc");Blink
2021-07-24 17:10:14 2759
原创 HDU 2031进制转换
#include <stdio.h>int stack[100];int top = -1;void push(int n){ stack[++top] = n;}int pop() { if(top < -1) { return -1; } return stack[top--];}int main() { int n,r, tmp, flag = 0; while(scanf("%d %d", &
2021-03-05 22:42:06 102
原创 ESP8266获取开发板的信息
#include<FS.h>FSInfo fs_info;void setup() { Serial.begin(9600); delay(1000); Serial.println("FPIFFS start "); SPIFFS.begin();// 闪存文件系统信息 SPIFFS.info(fs_info); // 可用空间总和(单位:字节) Serial.print("totalBytes: "); Serial.print(fs
2020-12-20 17:19:47 633 1
原创 ESP8266删除文件
#include<FS.h>String file_name = "/data/qxdo1.txt";String dir_name = "/data";void setup() { Serial.begin(9600); delay(1000); if(SPIFFS.begin()) { Serial.println("SPIFFS started"); } else { Serial.println("SPIFFS start failed");
2020-12-20 17:13:12 733
原创 ESP8266列出文件目录
#include<FS.h>String file_name = "/data/qxdo1.txt";String dir_name = "/data";void setup() { Serial.begin(9600); delay(1000); if(SPIFFS.begin()) { Serial.println("SPIFFS started"); } else { Serial.println("SPIFFS start failed");
2020-12-20 17:09:34 460
原创 ESP8266文件追加
#include<FS.h>String file_name = "/data/qxdo.txt";void setup() { Serial.begin(9600); delay(1000); if(SPIFFS.begin()) { Serial.println("SPIFFS started"); } else { Serial.println("SPIFFS start failed"); } if(SPIFFS.exists(file_n
2020-12-20 17:02:50 183
原创 ESP8266读取文件系统内容
#include<FS.h>String file_name = "/data/qxdo.txt";void setup() { Serial.begin(9600); delay(1000); if(SPIFFS.begin()) { Serial.println("SPIFFS started"); } else { Serial.println("SPIFFS start failed"); } if(SPIFFS.ex
2020-12-20 16:59:34 1186 2
原创 ESP8266 - 通过程序向ESP8266闪存文件系统写入信息
#include<FS.h>String file_name = "/data/qxdo.txt";void setup() { // put your setup code here, to run once: Serial.begin(9600); delay(1000); Serial.println("SPIFFS format start"); SPIFFS.format(); Serial.println("SPIFFS format
2020-12-20 00:26:17 617 1
原创 ESP8266开发-demo之- 将引脚状态显示在浏览器页面中
#include <ESP8266WiFi.h>#include <ESP8266WebServer.h>#define buttonPin D3const char *ssid = "PDCN";const char *passwd = "1234567890";bool pinState;ESP8266WebServer esp8266_server(80);void setup() { // put your setup code her
2020-12-20 00:05:17 418 1
原创 ESP8266 物联网小demo之 - 使用物联网的力量来点灯
#include <ESP8266WiFi.h>#include <ESP8266WebServer.h>const char *ssid = "PDCN";const char *passwd = "1234567890";ESP8266WebServer esp8266_server(80);void setup() { // put your setup code here, to run once: Serial.begin(9600)
2020-12-19 23:53:10 260 2
原创 ESP8266 作为小型WebServer响应http请求
#include <ESP8266WiFi.h>#include <ESP8266WebServer.h>const char *ssid = “PDCN”;const char *passwd = “1234567890”;ESP8266WebServer esp8266_server(80);void setup() {// put your setup code here, to run once:Serial.begin(9600);//WiFi.softAP
2020-12-19 23:34:15 1219 1
原创 ESP8266连接3已有WIFI
#include <ESP8266WiFi.h>const char *ssid = "WIFI-SSID";const char *passwd = "1234567890";void setup() { // put your setup code here, to run once: Serial.begin(9600); //WiFi.softAP(ssid, passwd); WiFi.begin(ssid, passwd); Serial.prin
2020-12-19 23:09:50 214 1
原创 ESP8266开发板-发射wifi信号
ESP8266 开发板第一个wifi程序#include <ESP8266WiFi.h>const char *ssid = "st-wifi";const char *passwd = "12345678";void setup() { // put your setup code here, to run once: Serial.begin(9600); WiFi.softAP(ssid, passwd); delay(1000); Seria
2020-12-19 22:59:34 793 1
原创 PAT 1001 Basic Level
第一题很easy啦,而且还是中文的。#include <stdio.h>int main() { int n=0,count = 0; scanf("%d",&n); while(n!= 1){ if(n % 2== 1){ n=3*n+1; } n/=2; ...
2019-07-27 22:32:28 109
原创 HDU 2099
#include <stdio.h>int main() { int a,b; while(scanf("%d%d",&a,&b)!=EOF){ if(a==0 && b == 0){ return 0; } a*=100; int d = 0;...
2019-07-22 20:39:11 99
原创 HDU 2097
#include <stdio.h>int test(int x,int n){ int tmp = 0; while(x != 0){ tmp = tmp + (x%n); x= x/n; } return tmp;}int main() { //printf("%d\n",test(2992,12));...
2019-07-22 20:08:55 89
原创 HDU 2096
这个题很神奇啊,第一次提交在test函数里写了一个若x大于等于100才做求余,而直接写求余就没问题。#include <stdio.h>int test(int x){ return x%100;}int main() { int t; scanf("%d\n",&t); for(int i=0;i<t;i++){ ...
2019-07-22 19:59:51 137
原创 HDU 2092
这个题本身想的方式很难受,但是后来想来想到了两个方程,联立,求判别式,并且判断判别式是否大于等于0,而且要根据最后的结果判定x的值是否是整数。这是根的表达式,根据解题思路,首先判定判别式大于或等于0,然后分别求即可。另外还要注意一点,n和m有可能一个是0另外一个不是0,这个情况也要考虑到。比如0 -1也是成立的。#include <stdio.h>#include <...
2019-07-22 11:30:46 422
原创 HDU 2090
#include <stdio.h>int main() { char name[1000]; double price=0.00,total=0.00,count = 0.00; while(scanf("%s %lf %lf",name,&count,&price) !=EOF ){ total = total +(cou...
2019-07-20 18:24:54 115
原创 HDU 2089
#include <stdio.h>int test(int n){ while(n >= 4){ //printf("%d\n",n); if( ( n % 100 == 62) || (n % 10 ==4)){ return 1; } n = n/10; } ...
2019-07-20 15:40:59 79
原创 HDU 2075
这个题是真的水哈哈哈哈 #include <stdio.h>int main() { int t = 0; scanf("%d",&t); while(t--){ int a,b; scanf("%d %d",&a,&b); if(a%b==0){ prin...
2019-07-20 15:22:35 138
原创 HDU 2071
#include <stdio.h>int main() { int n=0; scanf("%d",&n); for(int i=0;i<n;i++){ int m=0; double tmp=0.00,big=0.00; scanf("%d",&m); for(in...
2019-07-20 15:18:52 126
原创 HDU 2070
#include <stdio.h>#include <math.h>__int64 fib(int n){ __int64 m[55]; m[0] = 0; m[1] = 1; for(int i=2;i<=n;i++){ m[i] = m[i-1]+ m[i-2]; } return m[n]...
2019-07-19 21:55:30 125
原创 使用Jmeter进行接口压力测试
记录一下使用Jmeter进行接口压力测试的过程,记录学习的过程。1.下载JmeterJmeter根据目的环境去下载。2.下载解压之后,将Jmeter的bin目录配置进PATH环境变量中。Windows进入bin目录,运行jmeter.bat 会出来一个窗口,默认有一个Test Plan,保存一下这个模板,新建一个Thread Group,所需要修改的目标参数有两个,一个并发的线程数...
2019-07-11 19:44:25 449
转载 HDU 2057
这个题想了好久,想出来一种方法却还WA,参考下大佬的解题方法。#include<iostream>#include<algorithm>#include<cstdio>using namespace std; int main(){ __int64 a,b; while(~scanf("%I64X%I64X",&a,&a...
2019-06-16 22:04:23 125
原创 HDU 1004
这道题初看觉得很简单,但是综合很多特性,虽然用的方法比较笨,但是成功做出来了。#include <iostream>#include <cstdlib>#include <cstring>#include <cmath>#include <cstdio>#include <set>#include <s...
2019-06-12 01:04:01 148
原创 HDU 2091
可能在大佬看来这个题是水题,可是在我看来却不是,之前一直想了很久,也看了很多题解,结果最后还是没AC,今晚突然来了灵感,写出来就AC了。#include <iostream>#include <cstdlib>#include <cstring>#include <cmath>#include <cstdio>#incl...
2019-06-12 00:32:17 222
原创 HDU 2081
#include <iostream>#include <cstdlib>#include <cstring>#include <cmath>#include <cstdio>#include <set>#include <sstream>#include <vector>using ...
2019-06-08 14:53:27 185
原创 HDU 2072
参考了下别人的,操作字符串#include <iostream>#include <cstdlib>#include <cstring>#include <cmath>#include <cstdio>#include <set>#include <sstream>#include <ve...
2019-06-08 12:14:48 68
原创 HDU 2055
#include <iostream>#include <cstdlib>#include <cstring>#include <cmath>using namespace std;int main() { int t; cin>>t; while(t--){ char x; ...
2019-06-07 23:26:04 120
原创 HDU 2054
有参考大佬的题目,这个题目原来也没想太多,就是以为是一个简单的对比,结果WA。。。代码:#include <iostream>#include <cstdlib>#include <cstring>#include <cmath>using namespace std;void change(string &s){ ...
2019-06-07 23:10:36 59
原创 HDU 2042
#include <iostream>#include <cstdlib>#include <cstring>#include <cmath>using namespace std;int main() { int n; cin>>n; while(n--){ int a; ...
2019-06-07 22:38:20 133
原创 HDU 2040
#include <iostream>#include <cstdlib>#include <cstring>#include <cmath>using namespace std;int sum(int num){ int su = 0; for(int i=1;i<num ;i++){ if(...
2019-06-07 21:36:54 129
原创 HDU 2629
#include <iostream>#include <cstdlib>#include <cstring>using namespace std;int main() { int n=0; cin>>n; while(n--){ string idnumber; cin>...
2019-06-07 21:02:31 96
原创 HDU 1197
#include <iostream>using namespace std;int getsum(int num,int n){ int sum = 0; for(int i=0;i<4;i++){ int tmp = num % n; sum+=tmp; num = num / n; } ...
2019-06-07 20:09:13 155
原创 HDU 1170
#include<stdio.h>int main() { int t=0; scanf("%d",&t); getchar(); while(t--){ char c = '0'; int a=0,b=0; scanf("%c %d %d",&c,&a,&b); ...
2019-06-07 17:06:47 168
原创 使用Jsoup实现批量下载HDU的题目
目录起因参考原理代码缺点源码前几日和一位带佬交谈了一番,觉得自己刷题的效率太慢了,简直是蜗牛速度,甚至连acm的基本都还没,于是决定奋发图强,利用碎片时间来思考题目,而手机上看HDU是很难受的,所以我想到离线题目,在空闲的时候可以在手机上看。于是就有了本文,离线HDU的题目。参考题目的灵感是来自于·使用python爬取HDU文章(除了图),但是我发现了他的一...
2019-06-07 16:09:52 238
原创 HDU 1067题目
Gap 1067Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1990 Accepted Submission(s): 1031Problem ...
2019-06-07 15:43:39 159
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人