아두이노 I2C 센서 만들기 | # 24

// I2C Slave : SVR-05_D #include <Wire.h> #define slave_adress 5 int TH_data[2] ; int count = 0; void setup() { Wire.begin(slave_adress); Wire.onRequest(requestEvent); Serial.begin(9600) ; } void requestEvent() { byte Value; switch (count) { case 0: Value = 255;...

아두이노 아날로그 온도-습도계 | # 23

// SVR-05-D Humidity & Temperature sensor void setup() { Serial.begin(9600) ; } void loop() { float temp = analogRead(A0) ; float humid = analogRead(A1) ; temp = (temp/1023.*5.)*33.3 ; // 5V, slope=33.3 humid = (humid/1023.*5.)*33.3 ; Serial.print(” temp =...