목록전체 글 (20)
STUDY BLOG

온도센서가 상온에 있을 때 : RGB 모듈이 파란색 ON 온도센서를 손으로 잡았을 때 : RGB 모듈이 빨간색 ON const int pinLM35 = 1; const int pinLED_R = 10; const int pinLED_G = 9; const int pinLED_B = 8; int val = 0; void setup() { // put your setup code here, to run once: pinMode(pinLED_R, OUTPUT); pinMode(pinLED_G, OUTPUT); pinMode(pinLED_B, OUTPUT); Serial.begin(9600); } void loop() { // put your main code here, to run repeatedly: val..
명품 C++ programming Chapter 04 예제 연습 예제 4-1 객체 포인터 선언 및 활용 #include using namespace std; class Circle { int radius; public: Circle() { radius = 1; } Circle(int r) { radius = r; } double getArea(); }; double Circle::getArea() { return 3.14*radius*radius; } int main() { Circle donut; Circle pizza(30); cout
명품 C++ programming Chapter 03 예제 연습 예제 3-1 Circle 클래스의 객체 생성 및 활용 #include using namespace std; class Circle{ piblic: int radius; double getArea(); }; double Circle::getArea(){ return 3.14*radius*radius; } int main(){ Circle donut; // 객체 donut 생성 donut.radius =1; // donut의 멤버 변수 접근 double area = donut.getArea(); // donut의 멤버 함수 호출 cout
명품 C++ programming Chapter 02 예제 연습 예제 2-1 기본적인 C++ 프로그램 // cout과
티스토리 블로그 시작합니다. 주로 전공관련 과제, 프로젝트 관련 자료 업로드 예정입니다. 잘부탁드립니다.