buzzer
sendBuzzer ν¨μ ν
μ€νΈ
from time import sleep
from e_drone.drone import *
from e_drone.protocol import *
if __name__ == '__main__':
drone = Drone()
drone.open()
drone.sendBuzzer(BuzzerMode.Mute, BuzzerScale.Mute.value, 500)
sleep(1)
drone.sendBuzzer(BuzzerMode.Scale, BuzzerScale.C4.value, 500)
sleep(1)
drone.sendBuzzer(BuzzerMode.Hz, 500, 500)
sleep(1)
drone.sendBuzzerMute(100)
drone.sendBuzzerMuteReserve(100)
sleep(1.2)
drone.sendBuzzerScale(BuzzerScale.C5, 500)
drone.sendBuzzerScaleReserve(BuzzerScale.D5, 500)
sleep(1.2)
drone.sendBuzzerHz(1000, 500)
drone.sendBuzzerHzReserve(1200, 500)
sleep(1.2)
drone.close()
'νκ΅ μ’
μ΄ λ‘λ‘λ‘' μΌλΆ μ°μ£Ό
from time import sleep
from e_drone.drone import *
from e_drone.protocol import *
if __name__ == '__main__':
drone = Drone()
drone.open()
drone.sendBuzzer(BuzzerMode.Mute, BuzzerScale.Mute.value, 100)
sleep(0.2);
drone.sendBuzzerScale(BuzzerScale.G4, 300); sleep(0.4);
drone.sendBuzzerScale(BuzzerScale.G4, 300); sleep(0.4);
drone.sendBuzzerScale(BuzzerScale.A4, 300); sleep(0.4);
drone.sendBuzzerScale(BuzzerScale.A4, 300); sleep(0.4);
drone.sendBuzzerScale(BuzzerScale.G4, 300); sleep(0.4);
drone.sendBuzzerScale(BuzzerScale.G4, 300); sleep(0.4);
drone.sendBuzzerScale(BuzzerScale.E4, 300); sleep(0.4);
drone.close()
Buzzer ν΄λμ€ λ°μ΄ν°λ₯Ό μ§μ μ±μμ μ μ‘νκΈ°
from time import sleep
from e_drone.drone import *
from e_drone.protocol import *
if __name__ == '__main__':
drone = Drone()
drone.open()
header = Header()
header.dataType = DataType.Buzzer
header.length = Buzzer.getSize()
header.from_ = DeviceType.Tester
header.to_ = DeviceType.Controller
data = Buzzer()
data.mode = BuzzerMode.Scale
data.value = BuzzerScale.C5.value
data.time = 500
drone.transfer(header, data)
sleep(1)
data.mode = BuzzerMode.Hz
data.value = 1200
data.time = 500
drone.transfer(header, data)
sleep(1)
drone.close()
Last updated