Page 109 - MDP2022-2
P. 109
pinMode(PF3, INPUT);
pinMode(PF5, INPUT);
pinMode(PF10, INPUT);
pinMode(PC0, OUTPUT);
pinMode(PF8, OUTPUT);
pinMode(PB12, OUTPUT);
pinMode(PC6, OUTPUT);
pinMode(PC8, OUTPUT);
pinMode(PE8, OUTPUT);
pinMode(PB0,OUTPUT);
pinMode(PB11,OUTPUT);
attachInterrupt(digitalPinToInterrupt(PC0),Exti, RISING);
Serial.println("Start");
}
void loop() {
volatile static uint8_t a = 0;
lcd_begin();
}
2. 아두이노 코드
#include <Adafruit_Sensor.h>
#include "DHT.h"
#include <SoftwareSerial.h>
#include <math.h>
#define DHTPIN 12
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);=3
SoftwareSerial bluetooth(7, 8);
int temp_adr = 0;
char temp[50];
struct user{
int state = 0;
int adr = 0;
int i_datas[4];