---
title: Guide to Programming and Uploading Code to Leanbot
description: "To program and run your own creations on the Leanbot, please follow these phases in order: **Phase 1: Initial Setup & Connection** - **Step 1: Power On the Robot** - Turn on the power switch located on the Leanbot's body.…"
url: "https://pythaverse.space/docs/how-to-reload-the-program-for-leanbot/"
updated: "2025-12-19"
category: Troubleshooting guide
tags:
  - Leanbot
  - Reload the program
---

# Guide to Programming and Uploading Code to Leanbot

To program and run your own creations on the Leanbot, please follow these phases in order:

**Phase 1: Initial Setup & Connection**

- **Step 1: Power On the Robot**
  - Turn on the power switch located on the Leanbot's body.

![](https://pythaverse.space/wp-content/uploads/2023/07/word-image-5905-1.png)

- **Step 2: Pair Bluetooth (First-Time Connection Only)**
  - On your computer or device, search for and connect to the Bluetooth network named **Leanbot XXXXXX BLE** (where XXXXXX is the ID printed on the robot's body). [And enter the code "1234" if the system requires]

![](https://pythaverse.space/wp-content/uploads/2023/07/word-image-5905-2.png)

![](https://pythaverse.space/wp-content/uploads/2023/07/word-image-5905-3.png)

- - You will hear a **"Beep"** sound from the Leanbot upon a successful connection.

*(Note: You can skip this step if you have connected to this robot before).*

- **Step 3: Physical Connection**
  - Using the provided USB cable, connect the Leanbot to your computer.

![](https://pythaverse.space/wp-content/uploads/2023/07/word-image-5905-4.png)

**Phase 2: Programming in the PIDE**

- **Step 4: Access the Programming Environment**
  - Open your web browser and access to:  [**https://ide.pythaverse.space/#/code**](https://ide.pythaverse.space/#/code)

![](https://pythaverse.space/wp-content/uploads/2023/07/word-image-5905-5.png)

- **Step 5: Create a Project and Write Your Code**
  - Click “Click a new project, enter a name for your new project then hit “Create”.

![](https://pythaverse.space/wp-content/uploads/2023/07/word-image-5905-6.png)

- - Use the web-based programming interface to create your program for the robot.

![](https://pythaverse.space/wp-content/uploads/2023/07/word-image-5905-7.png)

**Phase 3: Uploading Code to the Robot**

- **Step 6: Compile Your Code**
  - Once you have finished coding, click the **"Compile"** button.

![](https://pythaverse.space/wp-content/uploads/2023/07/word-image-5905-8.png)

- - A browser pop-up window will appear with a title similar to: “*ide.pythaverse.space wants to connect to a serial port"*.

![](https://pythaverse.space/wp-content/uploads/2023/07/word-image-5905-9.png)

- **Step 7: Select Port and Connect**
  - In the pop-up window, find and **select the correct Serial port** that corresponds to your Leanbot.
  - After selecting, click the **"Connect"** button.

![](https://pythaverse.space/wp-content/uploads/2023/07/word-image-5905-10.png)

- **Step 8: Upload and Wait for Signals**
  - The system will immediately begin uploading your code to the robot. You will hear a single **"Beep"** to signal that the process has started.

![](https://pythaverse.space/wp-content/uploads/2023/07/word-image-5905-11.png)

- - **IMPORTANT:** Do not unplug the USB cable at any point during this process.
  - Upon completion, the system will display a success message, and you will hear a sequence of sounds: one **"Beep"** (signaling the upload is finished), followed immediately by a **"Beep Beep"** (signaling the robot is ready to run the new program).

![](https://pythaverse.space/wp-content/uploads/2023/07/word-image-5905-12.png)
