Arduino 精要
来自Jack's Lab
(版本间的差异)
(→扩展) |
(→扩展) |
||
(未显示1个用户的53个中间版本) | |||
第4行: | 第4行: | ||
[[Arduino I/O 之模拟输出]] | [[Arduino I/O 之模拟输出]] | ||
+ | |||
+ | [[Arduino I/O 之数字输出扩流]] | ||
[[Arduino memory]] | [[Arduino memory]] | ||
第17行: | 第19行: | ||
[[SPI 总线精要]] | [[SPI 总线精要]] | ||
+ | |||
+ | [[I2C 总线精要]] | ||
+ | |||
+ | [[I2S]] 总线精要 | ||
+ | |||
+ | [[ADC]] | ||
+ | |||
+ | [[UART_体系结构]] 3.3V-5V 电平转换:Sipex SP3222E/3232E | ||
<br><br> | <br><br> | ||
第22行: | 第32行: | ||
== 扩展 == | == 扩展 == | ||
− | [[Arduino Ethernet 的另一性价比选择]] | + | [[Arduino Ethernet 的另一性价比选择]] [https://www.arduino.cc/en/uploads/Main/arduino-Ethernet-Shield2-V2-sch.pdf W5500 Ethernet Shield v1.0] |
[[DHT21/AM2301 数字温湿度传感器]] | [[DHT21/AM2301 数字温湿度传感器]] | ||
+ | |||
+ | [[DHT11 数字温湿度传感器]] | ||
[[夏普 GP2Y1010AU0F 灰尘传感器]] | [[夏普 GP2Y1010AU0F 灰尘传感器]] | ||
+ | |||
+ | [[PT550 光敏二极管光线传感器]] | ||
+ | |||
+ | [[SHT20 数字温湿度传感器]] | ||
+ | |||
+ | [[PT100/PT1000 工业级温度传感器]] | ||
+ | |||
+ | [[SSD1306 OLED 显示屏]] | ||
+ | |||
+ | [[Encoder]] 旋转编码器 | ||
+ | |||
+ | [[MC105]] 可燃气体传感器 | ||
+ | |||
+ | [[MEMS Mic]] | ||
+ | |||
+ | [[Digipot]] 数字电位器 | ||
+ | |||
+ | [[RS485]] | ||
+ | |||
+ | [[MBus]] | ||
+ | |||
+ | [[RFID]] | ||
+ | |||
+ | [[LoRa]] | ||
+ | |||
+ | [[GPS]] | ||
+ | |||
+ | [[FT2232]] | ||
+ | |||
+ | [[LEON3]] | ||
+ | |||
+ | [[Geiger]] | ||
+ | |||
+ | [[Relay]] | ||
+ | |||
<br><br> | <br><br> | ||
第45行: | 第92行: | ||
[[Arduino 低功耗优化]] | [[Arduino 低功耗优化]] | ||
+ | |||
+ | [[ATtiny13]] | ||
+ | |||
+ | [[Eagle Tips]] | ||
+ | |||
+ | [[Raspberry]] | ||
+ | |||
+ | [[Modbus]] | ||
+ | |||
+ | [[DLT645]] | ||
+ | |||
+ | [[CJT188]] | ||
+ | |||
+ | [[Tesla]] | ||
+ | |||
+ | [[Power]] | ||
<br><br> | <br><br> | ||
第151行: | 第214行: | ||
== 资源 == | == 资源 == | ||
+ | |||
+ | * 二极管选型指南:http://www.vishay.com/docs/49627/49627.pdf | ||
+ | * [https://product.tdk.com/info/zh/products/capacitor/ceramic/mlcc/technote/solution/mlcc03/index.html 将电解电容器更换为MLCC的指南] | ||
+ | * [http://wiki.jackslab.org/images/Mcu.3v.tips.pdf MCU 3V Tips] | ||
+ | * [http://www.murata.com/zh-cn/products/emiconfun-tw/capacitor/2013/02/14/tw-20130214-p1 電容器阻抗/ESR頻率特性] | ||
+ | * [http://www.analog.com/library/analogDialogue/china/archives/45-01/bypass_capacitors.html 低压差调节器—为什么选择旁路电容很重要] | ||
+ | * [http://www.mem.com.tw/article_content.asp?sn=0808270006 精算陶瓷電容性能表現] | ||
+ | |||
* http://www.robopeak.com/blog/?p=107 | * http://www.robopeak.com/blog/?p=107 | ||
第157行: | 第228行: | ||
* avr-libc user manual: http://www.nongnu.org/avr-libc/user-manual/modules.html | * avr-libc user manual: http://www.nongnu.org/avr-libc/user-manual/modules.html | ||
+ | |||
<br><br> | <br><br> | ||
+ | |||
+ | == Notes == | ||
+ | |||
+ | [[0欧电阻和磁珠]] | ||
+ | |||
+ | [[谐振频率和抑制噪声]] | ||
+ | |||
+ | [[高频下过孔大小和走线长度对信号的影响]] | ||
+ | |||
+ | [[过孔和线宽与电流关系 ]] | ||
+ | |||
+ | [http://www.kblaminates.com/chs/upfile/2010123017220691104.pdf PCB 板材参数] | ||
+ | |||
+ | [[Altium Designer PCB 设计规则中英对照]] | ||
+ | |||
+ | [[RT5350F]] | ||
+ | |||
+ | <br><br> | ||
+ | |||
+ | == Reference == | ||
+ | |||
+ | * HTTP Spec: https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html | ||
+ | * https://zh.wikipedia.org/wiki/ASCII | ||
+ | |||
<br><br> | <br><br> | ||
<br><br> | <br><br> |
2017年10月18日 (三) 20:36的最后版本
目录 |
[编辑] 1 总览
I2S 总线精要
UART_体系结构 3.3V-5V 电平转换:Sipex SP3222E/3232E
[编辑] 2 扩展
Arduino Ethernet 的另一性价比选择 W5500 Ethernet Shield v1.0
Encoder 旋转编码器
MC105 可燃气体传感器
Digipot 数字电位器
[编辑] 3 应用
[编辑] 4 精华
[编辑] 5 糖豆
[编辑] 5.1 float2str
String(NUMBER, SCALE); String(3.141592,5); # "3.14159"
[编辑] 5.2 Software Serial
#include <SoftwareSerial.h> SoftwareSerial mySerial(10, 11); // RX, TX void setup() { // set the data rate for the SoftwareSerial port mySerial.begin(4800); mySerial.println("Hello, world?"); } void loop() { if (mySerial.available()) mySerial.write(Serial.read()); }
[编辑] 5.3 AT CMD
SerialEvent() is called after a loop(), if there is serial data in the buffer.
String input_str = ""; // a string to hold incoming data boolean str_over = false; // whether the string is complete void setup() { Serial.begin(9600); input_str.reserve(200); // reserve 200 bytes for the inputString: } void loop() { if (str_over) { // Identify the CMD and processing input_str = ""; // clear the string buffer str_over = false; } } /* * SerialEvent occurs whenever a new data comes in the hardware serial RX. * This routine is run between each time loop() runs, so using delay inside * loop can delay response. Multiple bytes of data may be available. */ void serialEvent() { while (Serial.available()) { char in = (char)Serial.read(); input_str += in; if (in == '\n') { // read a line into string buffer str_over = true; } } }
[编辑] 5.4 Hex str to ull
char hexstr2bin(char c) { if (isdigit(c)) { // 0 - 9 return c - '0'; } else if (isxdigit(c)) { // A-F, a-f return (c & 0xF) + 9; } return -1; } unsigned long long hexstr2ull(char * string) { unsigned long long x =0; char c; do { c = hexstr2bin(*string++); if (c < 0) break; x = (x << 4) | c; } while (1); return x; }
[编辑] 6 资源
- 二极管选型指南:http://www.vishay.com/docs/49627/49627.pdf
- 将电解电容器更换为MLCC的指南
- MCU 3V Tips
- 電容器阻抗/ESR頻率特性
- 低压差调节器—为什么选择旁路电容很重要
- 精算陶瓷電容性能表現
- http://www.robopeak.com/blog/?p=107
- spi flash: http://forum.arduino.cc/index.php?topic=178462.0
- http://www.avrfreaks.net/forum/winbond-spi-flash-library-avr-arduino-written-c
- avr-libc user manual: http://www.nongnu.org/avr-libc/user-manual/modules.html
[编辑] 7 Notes
[编辑] 8 Reference
- HTTP Spec: https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html
- https://zh.wikipedia.org/wiki/ASCII