Arduino Mega
-
Available in: Block Coding
-
Mode: Stage Mode, Upload Mode
-
WiFi Required: No
-
Compatible Hardware in Block Coding: Arduino Mega
-
Compatible Hardware in Python: Not Applicable
-
Object Declaration in Python: Not Applicable
-
Extension Catergory: Arduino
Introduction
Arduino Mega is a microcontroller board designed for electronics, robotics, automation, and projects that require many input and output connections. Its larger number of pins makes it suitable for controlling multiple sensors, motors, displays, LEDs, and other electronic components.
PictoBlox makes programming the Arduino Mega easier through its block-coding environment. Instead of writing code manually, you can drag and connect blocks to control digital pins, analog pins, PWM outputs, tones, and timers.
In this documentation, you will learn about the Arduino Mega extension, connect Arduino Mega to PictoBlox, and understand the purpose of each Arduino Mega block.
Connecting Arduino Mega to PictoBlox
Follow these steps to connect your Arduino Mega board to PictoBlox.
Step 1: Connect Arduino Mega
Connect the Arduino Mega board to your computer using a compatible USB cable. Make sure the board’s power LED turns ON after connecting it.

Step 2: Open PictoBlox
Open PictoBlox on your computer. Select the Block Coding environment.
Step 3: Select Arduino Mega Board
- Click on the Board menu from the top toolbar.
- Select Arduino Mega from the available board options.

Step 4: Select the Serial Port
Click on the Connect menu. Under Serial Ports (USB), find the port connected to the Arduino device.
Click Connect beside the correct device.
Step 5: Confirm the Connection
Wait while PictoBlox establishes communication with the Arduino Mega. After a successful connection, the screen will display the connected serial port, such as:

Click Go to Editor to open the coding workspace and start programming your Arduino Mega.
Step 6: Check Arduino Mega Blocks
After connecting the board, select the Arduino Mega category from the block palette.

You should see the following blocks:
- when Arduino Mega starts up
- read status of digital pin
- read analog pin
- set digital pin output
- set PWM pin output
- play tone
- get timer value
- reset timer
- cast
- map
These blocks allow you to control the built-in functionalities of Arduino Mega using PictoBlox.
PictoBlox Modes for Arduino Mega
1. Stage Mode
- Use Stage Mode when you want Arduino Mega to communicate with PictoBlox in real time.
- The board must remain connected to the computer while the project is running.
2. Upload Mode
- Use Upload Mode when you want to upload the complete program to Arduino Mega.
- After uploading, the board can run the program independently without remaining connected to PictoBlox.