group-icon
Arduino + Raspberry Pi Lovers
Discussion and Q&A about Arduino and Raspberry Pi projects.
179 Members
Join this group to post and comment.
Kunal Gokhe
Kunal Gokhe
Mechanical
24 Jan 2019

Quiz

Arduino IDE consists of 2 functions. What are they?
a) Build() and loop()
b) Setup() and build()
c) Setup() and loop()
d) Loop() and build() and setup()

Shaif Jawed
Shaif Jawed
Electronics and Telecommunication
1mo ago

The correct answer is Setup() and loop() 

Setup():: Once the sketch is uploaded to the arduino the setup block run once. Its simply for getting things ready for the main part of the sketch. We usually enter the input/output modes here or any initial input from a user or a sensor

Loop():: These blocks run one after another once the sketch is uploaded. When we end the program in the loop body with the curly brace, the program repeats itself again and again and continues till the arduino is connected to the power supply. 

Kunal Gokhe
Kunal Gokhe
Mechanical
1mo ago

Setup() is called once in the program when a sketch starts after power-up. It is used to initialixe variables, input and output pin modes, and other libraries needed in the sketch.
Loop() is used after setup() been called, function loop() is executed repeatedly in the main program. It controls the board until the board is powered off or is reset.