Raspberry Pi Pico 에서 Python 구동하기 위해 기존에 MicroPython 을 사용 했었는데 CircuitPyhon 을 사용하는 방법도 있다.
CircuitPython은 MicroPython을 기반으로 Adafruit사에서 만든 MicroPython 환경이라고 한다.
아무래도 사용자가 많고 라이브러리들이 많기 때문에 많이 사용한다고 한다.
CircuitPython 코드도 구동할 수 있다고 하니 CircuitPython을 사용하면 좋을것 같다.
우선 Raspberry Pi Pico용 펌웨어를 다운 받아 설치 하자.
https://circuitpython.org/board/raspberry_pi_pico/
CircuitPython - Pico Download
The Raspberry Pi foundation changed single-board computing when they released the Raspberry Pi computer, now they’re ready to do the same for microcontrollers with the release of the brand new Raspberry Pi Pico. This low-cost microcontroller board featur
circuitpython.org
IDE는 Code With Mu를 사용하면 된다.
실행하면 RP2040에 정상적으로 접속 되는것을 확인 할 수 있다.
이전에 테스트 했던 MicroPython 코드와 비교해 보면 라리브러리가 다른 점을 확인 인 할 수 있다.
import time
import board
import digitalio
led = digitalio.DigitalInOut(board.LED)
led.direction = digitalio.Direction.OUTPUT
while True:
led.value = True
time.sleep(0.5)
led.value = False
time.sleep(0.5)
반응형