Need you help, newbie here

led(x)

This is calling a function called led(), with the value in x. Is that really reasonable in your case?