| 数据搜索系统,热门电子元器件搜索 |
|
DFR0233 数据表(PDF) 13 Page - DFROBOT |
|
|
|||||||||||||||||||||||||||||
DFR0233 数据表(HTML) 13 Page - DFROBOT |
|
13 / 13 page ![]() } else { Serial.print ("\ncheck sum error! sum="); Serial.println (getsum_add (receive_ACK, 25), HEX); } } //if check sum is ok boolean checksum () { uint8_t checksum = getsum_add (receive_ACK, 25); if (checksum == receive_ACK[25]) return true; else return false; } //read 2 byte to uint16_t uint16_t read_uint8_t (uint8_t *buffer, uint8_t sub) { // Big-Endian, first byte is high byte return ((uint16_t)(buffer[sub]) << 8) + buffer[sub + 1]; } //get check sum, add from 0 to length-1 uint8_t getsum_add (uint8_t *buffer, uint8_t length) { uint8_t sum; for (int i = sum = 0; i < length; i++) { sum += buffer[i]; } return sum; } /**************************************************************************** ***/ Powered By DFRobot © 2008-2017 |
|
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |