4051 as demux?

hi everybody, its the first time i write in this forum... :slight_smile:

im very much of a beginner in everything concers arduino... i hope that u got some patiance for some slow questions...

im trying to build a box wich has 16 buttons and 16 leds... the idea is very simple , i press a button, and a led goes on.. (revolutionery, isnt it?) it suppose to be a kind of step sequencer controller... ive mannaged to multiplex 16 inputs to the arduino and to read it in max/msp, but i have no luck doing the opposite, i mean operating the leds... i could not find any info about the 4051 as demux on the web...woud anybody have any suggstions on how to keep on going? would sombody be kind enough to post am example code, even the simple of the simplest, just to give me an idea?

thanks very much for your time....

sbx