디지털펫 만들기 센텀고 정보 수업
페이지 정보
작성자 호영조 (211.♡.168.221) 작성일 24-09-20 10:24 조회 229 댓글 0본문
from microbit import *
Led_image1 = Image("11111:11111:11111:11111:11111")
Led_image2 = Image("55555:55555:55555:55555:55555")
Led_image3 = Image("99999:99999:99999:99999:99999")
while True:
sound_level = microphone.sound_level()
print(sound_level)
if sound_level < 85:
display.show(Led_image1)
elif sound_level < 150:
display.show(Led_image2)
else:
display.show(Led_image3)
Led_image1 = Image("11111:11111:11111:11111:11111")
Led_image2 = Image("55555:55555:55555:55555:55555")
Led_image3 = Image("99999:99999:99999:99999:99999")
while True:
sound_level = microphone.sound_level()
print(sound_level)
if sound_level < 85:
display.show(Led_image1)
elif sound_level < 150:
display.show(Led_image2)
else:
display.show(Led_image3)
좋아요1
이 글을 좋아요하셨습니다
등록된 댓글이 없습니다.