[SOLVED]Shortening code...


is there anyway shorten code?
im making led matrix , shorten
code: [select]

digitalwrite(ledpin2, high);


into someting this...
code: [select]

led2on


or

code: [select]

led2on;


i have tried using define , though compile led wouldn't turn on... >:(

edit: happy source has can modify


what looking called functions.
http://www.arduino.cc/en/reference/functiondeclaration

you can replace repeated sections of code function.

gordon


Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > [SOLVED]Shortening code...


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums