
OK, unlike the other “Hello World!” tutorials on stylus, this one will not display “Hello World!” on a screen. We will use one of the included Sketches to get the orange LED on the board to blink. I am also not using an actual Arduino-branded microcontroller; I have a MEGA 2560 R3 Improved Version CH340 from Kuongshun [1], which is an Arduino-compatible board that is part of my Ultimate Mega 2560 R3 Starter Kit from robotico.
In this tutorial:
Required knowledge:
An IDE is an Integrated Development Environment. You may already have experience of other IDE’s such as VSCode.
Arduino IDE
I installed and am currently using the latest version of the traditional Arduino IDE.
Install Arduino IDE
Download and install the Windows MSI installer from the official downloads page: https://www.arduino.cc/en/software
The latest version as of 21 February 2025 is Arduino IDE 2.3.4
Arduino Cloud Platform
I am using the installed version of the IDE.
There is also a version you can use in your browser via the Arduino Cloud Platform: the Arduino Cloud Platform IDE allows you to code in your browser.
The Arduino Cloud Agent must be installed and running on your computer in order to connect your board. https://cloud.arduino.cc/
Connect
- Connect your board to the power adapter and plug into a power socket.
- Connect your board to your computer using the USB cable.


- Power socket
- USB port
- Reset button
- Orange “L” LED
- Green, “ON” power LED
Once the board is connected to your computer via the USB cable and is connected to a power source, both LEDs will be on.
On old computers, communication (COM) ports referred to serial port interfaces on PC-compatible computers. It is now used to refer to emulated ports, such as ports created by Bluetooth or USB adapters.
Configure
I am using the installed version of the IDE.
- Select the model of your microcontroller
- Select the COM port


- The Menu bar
- Open the IDE; the sketch details and IDE version appear in the Title bar
- The currently selected microcontroller
- The name of the sketch file appears in the tab
- Your profile if you sign in to Arduino Cloud (it is not necessary to be signed in)
- The status bar displayed the details of the currently selected microcontroller
- Notifications indicator
- Open the bottom panel (if it is closed)
- Verify
- Upload
- Output panel
- Prevent scrolling in output panel
- Clear output panel
- Progress notification
The board’s connection to Windows will be recognised in the Device Manager as follows:

- Open the Device Manager
- Expand the Ports (COM & LPT) section
- Observe the listing for your Arduino-compatible board, which should be on COM5
The sample sketches are read-only, so don’t try and modify them, yet!
The Blink Sketch
At this stage, we want to check that our board is connected and functioning. Fortunately, the IDE includes several sketches. We will use the simplest of them, the Blink sketch. The code in this sketch controls the “L” LED.
When you open the IDE, it automatically creates a new sketch with the date as a default name shown in the tab. If you select File » Close, the whole IDE closes (bug?). So don’t try to close the sketch; navigate as follows to open the Blink sketch: File » Examples » Built-in examples » 01.Basics » Blink
The code below is documented in the comments:
/* Blink Turns an LED on for one second, then off for one second, repeatedly. Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to the correct LED pin independent of which board is used. If you want to know what pin the on-board LED is connected to on your Arduino model, check the Technical Specs of your board at: https://www.arduino.cc/en/Main/Products modified 8 May 2014 by Scott Fitzgerald modified 2 Sep 2016 by Arturo Guadalupi modified 8 Sep 2016 by Colby Newman This example code is in the public domain. https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink */ // the setup function runs once when you press reset or power the board void setup() { // initialize digital pin LED_BUILTIN as an output. pinMode(LED_BUILTIN, OUTPUT); } // the loop function runs over and over again forever void loop() { digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second }
Notes:
- Multi-line comments between /* and */
- Single line comments after //
- Every sketch has a
setup()
function, which runs once when the sketch is runloop()
function, which runs repeatedly after thesetup()
has run
Load the sketch to the controller. The code will run as soon as it has finished uploading. The “L” LED will blink.
What language is that?
The language we will use in the Arduino IDE is based on C++. It is not an ideal language for learning programming. If you are more interested in the electronics aspect of Coding & Robotics/automation/IoT/microcomputers, then it is basic enough for you to follow without too much trouble. If you are more interested in the programming side of Coding & Robotics/automation/IoT/microcomputers, then it is worth having a background in some kind of programming, even if it is as basic as Scratch.
Upload
When you hit the Upload button, the code is compiled and loaded into memory on the board. Any errors will be displayed in the Output panel.
Upon success, a message similar to the following will be displayed in the Output panel:
Sketch uses 1544 bytes (0%) of program storage space. Maximum is 253952 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 8183 bytes for local variables. Maximum is 8192 bytes.
The code will run as soon as it has finished uploading. The “L” LED will blink in the pattern 1 second on, then 1 second off, repeatedly.
Reset button
Hitting the physical Reset button on the board causes the sketch loaded in the board’s RAM to execute.
Modify
Modify the Blink sketch coming soon…
References:
- Kuongshun Electronic (no date) MEGA 2560 R3 Improved Version CH340. Available at: https://www.kuongshun-ks.com/uno/uno-board-shield/mega-2560-r3-improved-version-ch340.html (Accessed: 20 February 2025).