9월 14일
라즈베리파이 4일차
Ctrl + Insert 한 줄 복사
Shift + Insert 한 줄 붙여넣기
(VS Code)
폴더열기로 다시 지정
rm -rf .git으로 전부 제거한 뒤 다시 시작함
remote -v는 기존 설정값을 보여주는 것이고 ls-remote는 실제로 통신해서 보여주는 것으로 좀 더 시간이 걸림
#include <iostream>
#include <time.h>
#include <wiringPi.h>
// #include "Button.h"
// #include "Led.h"
// #include "Listener.h"
// #include "Controller.h"
// #include "View.h"
// #include "Service.h"
int main()
{
std::cout << "Hello World!" << std::endl;
time_t timeSec;
struct tm *timeData;
// Button button1(27);
// Led led1(21);
// Led led2(22);
// Led led3(23);
// Led led4(24);
// Led led5(25);
// View view(&led1, &led2, &led3, &led4, &led5);
// Service service(&view);
// Controller control(&service);
// Listener listener(&button1, &control);
while (1)
{
// listener.checkEvent();
// view.lightView();
timeSec = time(NULL);
timeData = localtime(&timeSec);
std::cout << "timeSec : " << timeSec << std::endl;
std::cout << timeData->tm_hour << " : "
<< timeData->tm_min << " : "
<< timeData->tm_sec << std::endl;
delay(100);
}
return 0;
}
https://youtube.com/shorts/hC6RY70rdlw?feature=share
https://github.com/316415/StandLight_Clock.git
GitHub - 316415/StandLight_Clock: additional function : clock
additional function : clock. Contribute to 316415/StandLight_Clock development by creating an account on GitHub.
github.com