用户工具

站点工具


en:reference:language:setup

setup()

The setup() function is called when program starts. Use it to initialize variables, pin modes, start using libraries, etc. The setup function will only run once, after each powerup or reset of the ocrobot board.

Example

int buttonPin = 3;
 
void setup()
{
  Serial.begin(9600);
  pinMode(buttonPin, INPUT);
}
 
void loop()
{
  // ...
}
en/reference/language/setup.txt · 最后更改: 2023/06/07 04:23 由 127.0.0.1