display

λͺ¨λ“  λ””μŠ€ν”Œλ ˆμ΄ μ œμ–΄ λͺ…령을 μ°¨λ‘€λŒ€λ‘œ μ‹€ν–‰

from time import sleep

from e_drone.drone import *
from e_drone.protocol import *


if __name__ == '__main__':

    drone = Drone()
    drone.open()

    delay = 0.5
    
    drone.sendDisplayClearAll(DisplayPixel.Black)
    sleep(delay)

    drone.sendDisplayClear(59, 27, 10, 10, DisplayPixel.White)
    sleep(delay)

    drone.sendDisplayInvert(54, 22, 20, 20)
    sleep(delay)

    drone.sendDisplayDrawPoint(64, 32, DisplayPixel.White)
    sleep(delay)

    drone.sendDisplayDrawLine(10, 10, 118, 54, DisplayPixel.White, DisplayLine.Dotted)
    sleep(delay)

    drone.sendDisplayDrawRect(44, 12, 40, 40, DisplayPixel.White, False, DisplayLine.Dashed)
    sleep(delay)

    drone.sendDisplayDrawCircle(64, 32, 20, DisplayPixel.White, True)
    sleep(delay)
    
    drone.sendDisplayDrawString(10, 10, "HELLO", DisplayFont.LiberationMono5x8, DisplayPixel.White)
    sleep(delay)
    
    drone.sendDisplayDrawStringAlign(0, 128, 30, "E-DRONE", DisplayAlign.Center, DisplayFont.LiberationMono10x16, DisplayPixel.White)
    sleep(delay)
    
    drone.close()

λ¬΄μž‘μœ„ μœ„μΉ˜μ™€ 크기의 Clearλ₯Ό 100회 전솑 (sendDisplayClear ν•¨μˆ˜ μ‚¬μš©)

λ¬΄μž‘μœ„ μœ„μΉ˜μ™€ 크기의 Clearλ₯Ό 100회 전솑 (클래슀 데이터 μ±„μ›Œμ„œ 전솑)

λ¬΄μž‘μœ„ μœ„μΉ˜μ™€ 길이의 선을 100번 그리기 (sendDisplayDrawLine ν•¨μˆ˜ μ‚¬μš©)

λ¬΄μž‘μœ„ μœ„μΉ˜μ™€ 크기의 원을 100번 좜λ ₯ν•˜κΈ° (sendDisplayDrawCircle ν•¨μˆ˜ μ‚¬μš©)

λ¬΄μž‘μœ„ μœ„μΉ˜μ™€ 크기의 원을 100번 좜λ ₯ν•˜κΈ° (클래슀 데이터 μ±„μ›Œμ„œ 전솑)

λ¬΄μž‘μœ„ μœ„μΉ˜μ™€ 크기의 μ‚¬κ°ν˜•μ„ 100번 좜λ ₯ν•˜κΈ° (sendDisplayDrawRect ν•¨μˆ˜ μ‚¬μš©)

λ¬΄μž‘μœ„ μœ„μΉ˜μ™€ 크기의 μ‚¬κ°ν˜•μ„ 100번 좜λ ₯ν•˜κΈ° (클래슀 데이터 μ±„μ›Œμ„œ 전솑)

'HELLO' λ¬Έμžμ—΄μ„ λ¬΄μž‘μœ„ μœ„μΉ˜μ— 100번 좜λ ₯ν•˜κΈ°

'LOVE' λ¬Έμžμ—΄μ„ μ™Όμͺ½, 쀑앙, 였λ₯Έμͺ½ 정렬을 μ‚¬μš©ν•˜μ—¬ λ¬΄μž‘μœ„ μœ„μΉ˜μ— 10번 좜λ ₯ν•˜κΈ°

Last updated