forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
CircuitPython version and board name
Adafruit CircuitPython 10.0.0-beta.2 on 2025-07-30; Adafruit Fruit Jam with rp2350b
Board ID:adafruit_fruit_jam
UID:5A5DC2FB5BCDD764
Code/REPL
# SPDX-FileCopyrightText: Copyright (c) 2024 ladyada for Adafruit Industries
#
# SPDX-License-Identifier: MIT
import board
import pulseio
import adafruit_irremote
# IR receiver setup
ir_receiver = pulseio.PulseIn(board.IR, maxlen=120, idle_state=True)
decoder = adafruit_irremote.GenericDecode()
def decode_ir_signals(p):
codes = decoder.decode_bits(p)
return codes
print("Setup OK.")
while True:
print("Looking for IR pulses.")
pulses = decoder.read_pulses(ir_receiver)
try:
# Attempt to decode the received pulses
received_code = decode_ir_signals(pulses)
if received_code:
hex_code = ''.join(["%02X" % x for x in received_code])
print(f"Received: {hex_code}")
except adafruit_irremote.IRNECRepeatException: # Signal was repeated, ignore
pass
except adafruit_irremote.IRDecodeException: # Failed to decode signal
print("Error decoding")
Behavior
IR transmitter pointed at Fruit Jam receiver at a distance of 4 inches.
Circuit Python code above does not detect any data received.
The board LED flickers when the IR transmitter buttons are pushed.
Description
No error is issued
Red board.LED flashes
No output from Circuit Python
Additional information
No response