Skip to content

bartoszadamczyk/pico-ir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pico IR

Lint License: MIT

Complete IR library for Raspberry Pico

Warning

Remember to check your modules' voltage, you might need logic level converter to convert between 3v3 and 5v!

Example

import utime
from machine import Pin
from pico_ir import read_code, send_code, validate_code, InvalidCodeException

pin_in = Pin(20, Pin.IN, Pin.PULL_UP)
pin_out = Pin(21, mode=Pin.OUT)

while True:
    out = read_code(pin_in)
    # ignore random signals 
    if out:
        try:
            validate_code(out)
            print(out)
            utime.sleep(3)
            send_code(pin_out, out)
        except InvalidCodeException:
            print("InvalidCodeException:" + out)

About

IR library for Raspberry Pi Pico

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages