목록Portfolio (5)
EASY7
1. c++ g++ -o test test.cpp $(pkg-config --libs --cflags opencv) -lwiringPi -lraspicam -lraspicam_cv ./test 2. python sudo python test.py 3. c gcc -o test test.c -lwiringPi ./test 4. github사용법 cp fantest2.c ~/directory git add fantest2.c : 더하기 git commit : 주석 달기 git push : 아이디, 비번
정말 기본적인 온도센서!! http://itempage3.auction.co.kr/DetailView.aspx?ItemNo=B287575526&frm3=V2 에서 구매함. 1번 pin Signal 2번 pin 5V 3번 pin GND 코드는 이 글을 참고 했다. http://www.uugear.com/portfolio/dht11-humidity-temperature-sensor-module/ c언어 코드로 돌린 것!! VCC랑 GND를 바꿔서 끼우면 이래 되어요...
설명: 모든 벽돌을 깨야 이긴다. 바닥에 떨어지면 game over 1. Start 버튼을 누르면 actionListener 실행 _startBtn = new JButton("Start"); _startBtn.addActionListener(new StartActionListener()); this.add(_startBtn); private class StartActionListener implements ActionListener { public void actionPerformed(ActionEvent e) { _drawingPanel.setAnimation(true); } public void setAnimation(boolean turnOnOff) { if (turnOnOff) { _timer.s..
설명: 위, 좌, 우 벽에 닿으면 반사되고 아래 벽에 닿으면 게임에서 지는 게임입니다. 막대기에 닿으면 공이 반사되므로 막대기를 좌우로 움직여 공을 살려내야합니다. 응용: 공의 스피드 조정하는 버튼 만들기 원리: 1. 공 움직이기 TimerListener timerListener = new TimerListener(); _timer = new Timer(20, timerListener); private class TimerListener implements ActionListener { public void actionPerformed(ActionEvent e) { _ball.move(); repaint(); } } 1000=1초로 보고 20=0.02초마다 timerListener의 actionPerfo..