# Upload Mode

The default programming mode with Codey is "Upload mode". Once Codey is connected to mBlock 5, "Upload mode" is toggled on, as shown below:

![](http://docs.makeblock.com/codeyrocky/en/tutorials/images/upload-mode-1.png)

Under "Upload mode", programming has following features:

1. All programs need to be uploaded to Codey to run. When you finish programming, click "Upload" to upload the program.\ <br>
2. The uploaded program can run offline (disconnected from mBlock 5).\ <br>
3. When powered off and on again, Codey will still run the program that is uploaded last time before it is powered off.\ <br>
4. Under "Upload mode", you are not able to combine Scratch stage programming with Codey. (Toggle off "Upload mode" if you want to use Scratch stage programming.)

   Hence, several blocks from the Events category are unavailable. These specific blocks are: when green flag clicked, when () key pressed, and broadcast () and wait.

   ![](http://docs.makeblock.com/codeyrocky/en/tutorials/images/upload-mode-4.png)

   **Note:**\
   Messages generated by the Events block work within one single project, and under "Upload Mode", Codey Rocky can only send messages to itself.<br>

### Toggle Off "Upload Mode" <a href="#toggle-off-upload-mode" id="toggle-off-upload-mode"></a>

When "Upload mode" is toggled off, programming has the following features:

1. Programs no longer need to be uploaded to run. You will find the "Upload" button taken out of the user interface.

   ![](http://docs.makeblock.com/codeyrocky/en/tutorials/images/upload-mode-2.png)

   Simply click the script to run and see how it works. Edit it and click it to run again. It is convenient for you to test and try your programs.

   **Note:**\
   Single click to run the script; double click to run a certain block.<br>
2. Programs can not run offline. Codey needs to remain connected to mBlock 5.\ <br>
3. Scratch stage programming is ready to work with Codey. The three Events blocks are now available, namely when green flag clicked, when () key pressed, and broadcast () and wait.

   Under this circumstance, one Event block is now unavailable: when Codey starts up.

   ![](http://docs.makeblock.com/codeyrocky/en/tutorials/images/upload-mode-3.png)**Note:**\
   Messages generated by the Events blocks work within one single project, and can be used in three circumstances: 1) Codey Rocky sending messages to itself; 2) between Codey Rocky and the Stage; 3) within the Stage.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.pakronics.com.au/primary/codey-rocky-ai-robot/tutorials/upload-mode.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
