Setup() and Loop()

by Irregular Logic

When I was programming the Arduinos for school, setup() is used to define the pin ports and the general (not function specific) variables used in the code.

The loop() section is actually optional. If you want some code to execute just once, leave it outside of loop(). You can also just use standard C++ loops like for() and while() to set up a forever-repeating code.

Posted on Apr 15, 2017, 10:31 AM

Respond to this message

Goto Forum Home

Quantcast

eXTReMe Tracker