Skip to content

MegaETH_minimal_code

Dmitry Dubinsky edited this page Nov 20, 2019 · 1 revision

::: {.highlight} c++ :::

Minimal code

The minimal valid code to run on Mega 2560 ETH has the following structure:

void setup() {
  // code that you put here will run exactly once, at startup

}

void loop() {
  // code that you put here will run repeatedly until power off or reset to run repeatedly:

}

Every line that starts with "//" is ignored by the compiler, so you can put any descriptions and comments in the code where you need them.

Clone this wiki locally