This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <unistd.h> | |
#include <sys/wait.h> //waitpid() 함수를 위해 사용 | |
int main(int argc, char **argv){ | |
pid_t pid; | |
int pfd[2]; | |
char line[BUFSIZ]; // <stdio.h> 파일에 정의된 버퍼 크기로 결정 | |
int status; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<wiringPi.h> | |
#define TRIG 21 // trig GPIO 5 | |
#define ECHO 22 // echo GPIO 6 | |
int main(void){ | |
long startTime; | |
long travelTime; | |
int distance=0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
sock=socket.socket(socket.AF_INET,socket.SOCK_DGRAM) | |
while True: | |
#Error Case | |
#print("wait?") | |
#data,addr=sock.recvfrom(1024) | |
#print("Client is received data : ",data.decode()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//server.cpp | |
//header.h | |
# include <stdio.h> | |
# include <string.h> | |
# include <stdlib.h> | |
# include <netinet/in.h> | |
# include <sys/socket.h> | |
# include <arpa/inet.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from socket import * | |
clientSock = socket(AF_INET, SOCK_STREAM) | |
clientSock.connect(('169.254.42.23', 5100)) | |
print('연결 확인 됐습니다.') | |
clientSock.send('I am a client'.encode('utf-8')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <sys/socket.h> | |
#include <arpa/inet.h> | |
#define TCP_PORT 5100 | |
int main(int argc, char **argv) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <sys/socket.h> | |
#include <arpa/inet.h> | |
#define TCP_PORT 5100 | |
int main(int argc, char **argv) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <wiringPi.h> | |
#include <pcf8591.h> | |
#include <math.h> | |
#define PCF 120 | |
int main (void) | |
{ | |
int value0 ; | |
int value1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
cap=cv2.VideoCapture(0) # 카메라 0번 장치 연결 | |
width=cap.get(cv2.CAP_PROP_FRAME_WIDTH) # 프레임 폭 | |
height=cap.get(cv2.CAP_PROP_FRAME_HEIGHT) # 프레임 높이 | |
print("Original Size",width,height) | |
cap.set(cv2.CAP_PROP_FRAME_WIDTH,320) | |
cap.set(cv2.CAP_PROP_FRAME_HEIGHT,240) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow_hub as hub | |
import cv2 | |
import numpy | |
import tensorflow as tf | |
import pandas as pd | |
# Carregar modelos | |
detector = hub.load("https://tfhub.dev/tensorflow/efficientdet/lite2/detection/1") | |
labels = pd.read_csv('labels.csv',sep=';',index_col='ID') | |
labels = labels['OBJECT (2017 REL.)'] |