-
Ch01. 라즈베리파이 시작하기Raspberry Pi ( python ) 2023. 2. 27. 15:14
1 _ SD Card Format
SD Card Formatter를 다운받아서 작업을 진행하기 전 SD Card를 포맷할 수 있습니다.
링크 : http://sd-card-formatter.kr.uptodown.com/windows/download
Volume label에 raspberry 라고 작성한 뒤, Overwrite format을 체크한 후 Format을 진행한다.
2 _ Raspbian (라즈비안) 다운로드 후 SD 카드 세팅
: 라즈베리 파이의 공식 운영체제인 라즈비안을 SD 카드에 세팅해야한다.
링크 : https://www.raspberrypi.org
3 _ 라즈베리파이, 브레드보드 정상 확인
: 라즈베리 파이로 LED 작동시키기
1. 파일 매니저를 실행시킨다. ( 메뉴 - 보조프로그램 - File Manager 또는 파일 매니저 아이콘 클릭 )
2. wdbapps/ch01 폴더 생성
3. Geany 에디터 실행 ( 라즈베리파이에서 python을 실행할 수 있게 도와준다 )
4. py 파일 생성
파일명 : led_ex01.py import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BOARD) LED = 8 GPIO.setup(LED, GPIO.OUT, initial=GPIO.LOW) try: while 1: GPIO.output(LED, GPIO.HIGH) time.sleep(0.5) GPIO.output(LED, GPIO.LOW) time.sleep(0.5) except KeyboardInterrupt: pass GPIO.cleanup()
'Raspberry Pi ( python )' 카테고리의 다른 글
CH.04 라즈베리 파이를 위한 전자 기초 배우기 (0) 2023.03.03 CH.02 라즈베리 파이를 위한 리눅스 기초 배우기 (0) 2023.02.28 Ch03. 파이썬 기초 (함수, 클래스, 모듈) (0) 2023.02.24 Ch03. 파이썬 기초 (제어문) (0) 2023.02.24 라즈베리파이 : 파이썬 연습문제 (02/23) (0) 2023.02.23