'AND GATE'

from machine import Pin
from time import sleep

blue_button = Pin(28, Pin.IN, Pin.PULL_DOWN)    
yellow_button = Pin(26, Pin.IN, Pin.PULL_DOWN)  
led = Pin(15, Pin.OUT)                         

while True:
    
    if blue_button.value() == 1 and yellow_button.value() == 1:
        led.toggle()  # Toggle the LED state if both buttons are pressed
    
    sleep(0.01)  


'OR GATE'
'''
from machine import Pin
from time import sleep

blue_button = Pin(28, Pin.IN, Pin.PULL_DOWN)    
yellow_button = Pin(26, Pin.IN, Pin.PULL_DOWN)  
led = Pin(15, Pin.OUT)                         

while True:
    
    if blue_button.value() == 1 or yellow_button.value() == 1:
        led.value(1)
    else:
        led.value(0)

    sleep(0.01) 
    '''
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT