MONTH

2021年10月

  • 2021年10月9日
  • 2021年11月28日

4. Upload arduino code to board for the first time

4. Upload arduino code to board for the first time After completing installation of Arduino IDE and connecting arduino board to a PC, you are ready to upload a simple arduino code for the first time to test if the arduino environment works. The example here uses “Arduino UNO” board. (1) Let’s write a simple code as below. void setup() { pinMode( 13, OUTPUT ); } void loop() { digitalWrite( 13, HIGH ); } Here I will briefly explain the meaning of each block. Setup() block is run only once after the code is uploaded. Setup() is used to initialize settings of connected devices or to do the setting for libraries. There must be one setup() code in any arduino code. Loop() block is the […]