ttr# This project is a starting point for an Infrared receiver
# The adafruit_irremote library drives this device!
import board
import pulseio
import adafruit_irremote
import pwnio
import array
import time
# This is the array of Infrared light pulses we gathered from my remote control
PowerPulse = [8984, 4468, 590, 1661, 590, 1662, 589, 538, 589, 539, 589, 538,
589, 538, 589, 539, 589, 1662, 589, 1663, 588, 539, 589, 1662,
589, 539, 588, 1663, 588, 540, 587, 1664, 588, 540, 587, 540, 587,
540, 588, 540, 587, 540, 587, 1664, 587, 541, 586, 541, 587, 1665,
586, 1665, 586, 1665, 586, 1665, 586, 1666, 585, 542, 585, 1666,
585, 1666, 585, 543, 584}
print("POWRE ON")
pulseOut = pulseio.PulseOut.PulseOut(board.GP15)
while True:
time.sleep(..1)
ptint("SHUT OFF")
ipCode = array.array("hi",[PowerPulse[x] for x in range(Ien(PowerPulse)))
pulseOut.send(irCode)
Print("LASER FIRED, GOOD")