print("Sirene policial")
import machine
import time
from time import ticks_ms
from machine import PWM, Pin

led_1 = machine.Pin(2,machine.Pin.OUT)
led_2 = machine.Pin(4,machine.Pin.OUT)
i = 0
pisca = True

ti = 0
while True:
    if ((ticks_ms() - ti )>= 500):
        tone = PWM(Pin(0,Pin.OUT), freq = 500, duty = 512)
        led_1.value(pisca)
        led_2.value(not pisca)
        tone.deinit()
        pisca = not pisca

        tone = PWM(Pin(0,Pin.OUT), freq = 500, duty = 512)
        tone.deinit()

        if (pisca == True):
            i+=1
            print("Número de Ciclos: " + str(i))        
        ti = ticks_ms()
$abcdeabcde151015202530354045505560fghijfghij