C
@RobTuDelft ok fair enough. so Following code should work right?
import time
from machine import Pin
import machine
import pycom
pycom.heartbeat(False)
def toggle_rgbled_blue(arg):
pycom.rgbled(0xff)
time.sleep(2)
pycom.rgbled(0)
def toggle_rbgled_red(arg):
pycom.rgbled(0x7f0000)
time.sleep(2)
pycom.rgbled(0)
button_blue = Pin('P10', mode=Pin.IN, pull=Pin.PULL_UP)
button_blue.callback(Pin.IRQ_RISING, toggle_rgbled_blue)
buton_red = Pin('P0', mode=Pin.IN, pull=Pin.PULL_UP)
button_red.callback(Pin.IRQ_RISING, toggle_rgbled_red)
Cheers
Colombian