본문 바로가기

RaspberryPi/RP2040

RP2040 SSM EVM - CircuitPython 내부온도 출력 하기

RP2040은 칩내부에 온도 센서가 있고 칩의 온도 값을 출력하기 위해  microcontroller 패키지를 이용하면 쉽게 온도 값을 출력 할 수 있다.

 

간단히 아래와 같이 내부온도를 쉽게 출력 할 수 있다.

import time
import microcontroller

while True:
    print(microcontroller.cpu.temperature)
    time.sleep(0.5)
반응형