上一页 1 2 3 4 5 6 7 8 9 10 ··· 17 下一页
摘要: Ticker的功能非常简单,就是规定时间后调用函数 总体上,根据功能可以把方法分为两大类: 定时器管理方法; 定时器启用方法; detach() 停止定时器 active() 定时器是否工作 返回值 bool 1.1 前言 Ticker是Arduino Core For ESP8266 内置的一个定 阅读全文
posted @ 2020-03-05 20:05 chenlife 阅读(7307) 评论(0) 推荐(1)
摘要: 参考博文https://www.cnblogs.com/yujianfei/p/8974813.html https://www.cnblogs.com/codingmengmeng/p/5906282.html https://blog.csdn.net/guotianqing/article/d 阅读全文
posted @ 2020-03-05 17:05 chenlife 阅读(300) 评论(0) 推荐(0)
摘要: https://zzk.cnblogs.com/my/s/blogpost 阅读全文
posted @ 2020-03-05 13:16 chenlife 阅读(381) 评论(0) 推荐(0)
摘要: #include <stdio.h> void main() { unsigned int x = -5; printf("%d", x); } 结果为什么是-5,不是unsigned么,它在二进制中是怎么操作的,不会变成比5大的数吗? 因为就是-5啊,你输出的是【%d】,表示把x当成按照有符号整数 阅读全文
posted @ 2020-03-05 06:06 chenlife 阅读(372) 评论(0) 推荐(0)
摘要: 如果a是整数当然是需要的,因为是先计算再赋值的,计算的时候并不知道你需要浮点。 追问 如果a是整形,那么a=a*1.0是不是就可以把a变成实型? 追答 Yes float a = 12 * 1.0; //编译错误 double b = 12 * 1.0;//正确 float c = 12 * 1.0 阅读全文
posted @ 2020-03-05 04:15 chenlife 阅读(521) 评论(0) 推荐(0)
摘要: 简单来说,uint8_t / uint16_t / uint32_t /uint64_t这些数据类型都只是别名而来,具体如下: 一、C语言数据基本类型在C语言中有6种基本数据类型:short、int、long、float、double、char 1)整型:short int、int、long int 阅读全文
posted @ 2020-03-05 03:29 chenlife 阅读(3240) 评论(0) 推荐(0)
摘要: std::sqrt, std::sqrtf, std::sqrtl C++ 数值库 常用数学函数 定义于头文件 <cmath> (1) float sqrt ( float arg ); float sqrtf( float arg ); (C++11 起) double sqrt ( double 阅读全文
posted @ 2020-03-04 22:01 chenlife 阅读(2567) 评论(0) 推荐(0)
摘要: #include<stdlib.h> void setup() { Serial.begin(115200); char dataH[5]; char dataC[5]; char dataF[5]; float h = 56.00; float c = 31.50; float f = 88.70 阅读全文
posted @ 2020-03-04 21:54 chenlife 阅读(1870) 评论(0) 推荐(0)
摘要: 在任何其他C / C ++平台中,当您要使用printf或其同级元素打印(或转换为字符串)浮点数时,可以将“%f”用作格式说明符。任何,除了在Arduino中。 要转换浮点,您需要使用dtostrf(), char * dtostrf( double __val, signed char __wid 阅读全文
posted @ 2020-03-04 21:47 chenlife 阅读(1696) 评论(0) 推荐(0)
摘要: Arduino 整型转字符型 https://blog.csdn.net/janet_1994/article/details/60777848实现了类型转换,主要使用 stdlib.h 中的 itoa() 函数来实现。 功能:将任意类型的数字转换为字符串。在 char * itoa(int val 阅读全文
posted @ 2020-03-04 21:22 chenlife 阅读(5577) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 17 下一页