freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于物聯(lián)網(wǎng)的智能澆花演示系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)-資料下載頁

2024-12-04 04:23本頁面

【導(dǎo)讀】計(jì)算機(jī)與通信學(xué)院。物聯(lián)網(wǎng)綜合應(yīng)用實(shí)踐課程設(shè)計(jì)

  

【正文】 __________________ ________ // DATA: |_______| // _ _ _ _ _ _ _ _ _ ___ ___ // SCK : __| |__| |__| |__| |__| |__| |__| |__| |__| |______| |___| |______ { unsigned char i。 DATA=1。 SCK=0。 //Initial state for(i=0。i9。i++) //9 SCK cycles { SCK=1。 SCK=0。 } s_transstart()。 //transmission start } // char s_softreset(void) // // resets the sensor by a softreset { unsigned char error=0。 s_connectionreset()。 //reset munication error+=s_write_byte(RESET)。 //send RESETmand to sensor return error。 //error=1 in case of no response form the sensor } // char s_read_statusreg(unsigned char *p_value, unsigned char *p_checksum) // // reads the status register with checksum (8bit) { unsigned char error=0。 s_transstart()。 //transmission start error=s_write_byte(STATUS_REG_R)。 //send mand to sensor *p_value=s_read_byte(ACK)。 //read status register (8bit) *p_checksum=s_read_byte(noACK)。 //read checksum (8bit) return error。 //error=1 in case of no response form the sensor } JDFJKDHFKAHGJHLKFHJHAKHFLJKDHFKLJASHDFKJHAKLDFHDLSFHKLDSJ DFSGSJDFKGHERUHJKDHKLSHDKJHKSHKFHLKGHDLSFGHDSKLFHGLDKSFHGLKFGDS // char s_write_statusreg(unsigned char *p_value) // // writes the status register with checksum (8bit) { unsigned char error=0。 s_transstart()。 //transmission start error+=s_write_byte(STATUS_REG_W)。//send mand to sensor error+=s_write_byte(*p_value)。 //send value of status register return error。 //error=1 in case of no response form the sensor } // char s_measure(unsigned char *p_value, unsigned char *p_checksum, unsigned char mode) // // makes a measurement (humidity/temperature) with checksum { unsigned error=0。 unsigned int i。 s_transstart()。 //transmission start switch(mode){ //send mand to sensor case TEMP : error+=s_write_byte(MEASURE_TEMP)。 break。 case HUMI : error+=s_write_byte(MEASURE_HUMI)。 break。 default : break。 } for (i=0。i65535。i++) if(DATA==0) break。 //wait until sensor has finished the measurement if(DATA) error+=1。 // or timeout (~2 sec.) is reached *(p_value) =s_read_byte(ACK)。 //read the first byte (MSB) *(p_value+1)=s_read_byte(ACK)。 //read the second byte (LSB) *p_checksum =s_read_byte(noACK)。 //read checksum return error。 } // void init_uart() // //9600 bps @ MHz {SCON = 0x52。 TMOD = 0x20。 TCON = 0x69。 TH1 = 0xfd。 } // void calc_sth11(float *p_humidity ,float *p_temperature) // // calculates temperature [C] and humidity [%RH] JDFJKDHFKAHGJHLKFHJHAKHFLJKDHFKLJASHDFKJHAKLDFHDLSFHKLDSJ DFSGSJDFKGHERUHJKDHKLSHDKJHKSHKFHLKGHDLSFGHDSKLFHGLDKSFHGLKFGDS // input : humi [Ticks] (12 bit) // temp [Ticks] (14 bit) // output: humi [%RH] // temp [C] { const float C1=。 // for 12 Bit const float C2= 。 // for 12 Bit const float C3=。 // for 12 Bit const float T1=。 // for 14 Bit @ 5V const float T2=。 // for 14 Bit @ 5V float rh=*p_humidity。 // rh: Humidity [Ticks] 12 Bit float t=*p_temperature。 // t: Temperature [Ticks] 14 Bit float rh_lin。 // rh_lin: Humidity linear float rh_true。 // rh_true: Temperature pensated humidity float t_C。 // t_C : Temperature [C] t_C=t* – 40。 //calc. Temperature from ticks to [C] rh_lin=C3*rh*rh + C2*rh + C1。 //calc. Humidity from ticks to [%RH] rh_true=(t_C25)*(T1+T2*rh)+rh_lin。 //calc. Temperature pensated humidity [%RH] if(rh_true100)rh_true=100。 //cut if the value is outside of if(rh_true)rh_true=。 //the physical possible range *p_temperature=t_C。 //return temperature [C] *p_humidity=rh_true。 //return humidity[%RH] } //
點(diǎn)擊復(fù)制文檔內(nèi)容
研究報(bào)告相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1