Why doesn't my LEGO Micropython remote control program work? I am writing an EV3 micropython program meant to test my remote, but it does not work. When I run it, I see no errors at all. Instead, I just see a &quot;play&quot; symbol and the program continuously runs. If I press any buttons on my remote control, nothing at all happens. The code is below:
#!/usr/bin/env pybricks-micropython
from pybricks.hubs import EV3Brick
from pybricks.ev3devices import (Motor, TouchSensor, ColorSensor,
                                 InfraredSensor, UltrasonicSensor, GyroSensor)
from pybricks.parameters import Port, Stop, Direction, Button, Color
from pybricks.tools import wait, StopWatch, DataLog
from pybricks.robotics import DriveBase
from pybricks.media.ev3dev import SoundFile, ImageFile


# This program requires LEGO EV3 MicroPython v2.0 or higher.
# Click &quot;Open user guide&quot; on the EV3 extension tab for more information.


# Create your objects here.
ev3 = EV3Brick()
ir = InfraredSensor(Port.S1)
# ONLY USE THIS ONE PROGRAM!!!
while True:
    if ir.buttons(1) == Button.BEACON:
        ev3.light.on(Color.RED)
    else:
        ev3.light.on(Color.GREEN)

Do you have any solutions to this problem? Thanks.
You can get community support for Pybricks at https://github.com/pybricks/support.
ir.buttons(1) returns a list of pressed buttons, so in this particular program
if ir.buttons(1) == Button.BEACON:

needs to be changed to
 if Button.BEACON in ir.buttons(1):

This will test if item is in list.