mohamed gamal
/
DHT_CANSAT
DHT_CANSAT
Fork of DHT_TEST2 by
Embed:
(wiki syntax)
Show/hide line numbers
main.cpp
00001 #include "mbed.h" 00002 #include "DHT22.h" 00003 DHT22 dht22(p23); 00004 int main() { 00005 int hum; 00006 int temp; 00007 printf("Start\n"); 00008 printf("\r\nSetting up...\r\n"); 00009 while (1) { 00010 dht22.sample() ; 00011 hum=dht22.getHumidity()/10.0; 00012 temp=dht22.getTemperature()/10.0; 00013 printf("temp: %d , hum:%d ",temp,hum); 00014 wait(1); 00015 }}
Generated on Thu Jul 14 2022 02:28:45 by 1.7.2