|
| 1 | +--- |
| 2 | +title: 'Cloud Editor (New)' |
| 3 | +description: 'Get started with the Cloud Editor, an online IDE in the Arduino Cloud.' |
| 4 | +author: 'Karl Söderby' |
| 5 | +--- |
| 6 | + |
| 7 | +The [Cloud Editor](https://app.arduino.cc/sketches/) is an online code editor which is part of the [Arduino Cloud](https://app.arduino.cc/). With the Cloud Editor, you can write sketches and upload them to your Arduino board, where all your progress is automatically stored in the Cloud! |
| 8 | + |
| 9 | +The Cloud Editor features all the necessary tools to develop and test your Arduino projects, including: |
| 10 | +- A compiler that checks that your code works on the specified board, |
| 11 | +- an upload tool that uploads a sketch to your board, |
| 12 | +- the Serial Monitor, a tool that reads serial data sent from your board, |
| 13 | +- all board packages & libraries available without download! |
| 14 | + |
| 15 | +***To use the Cloud Editor, you will need to [install the Cloud Agent](https://create.arduino.cc/getting-started/plugin/welcome), a plugin that allows your browser to access USB devices (your board). You will also need an [Arduino account](https://app.arduino.cc/). The steps are covered later on in this guide.*** |
| 16 | + |
| 17 | +## Hardware & Software Needed |
| 18 | + |
| 19 | +- [Cloud Agent](https://create.arduino.cc/getting-started/plugin/welcome) |
| 20 | +- Arduino board (all Arduino boards are supported). |
| 21 | +- USB cable (different depending on the board you are using). |
| 22 | + |
| 23 | +***If you don't have an Arduino board, visit the [Arduino Store](https://store.arduino.cc/).*** |
| 24 | + |
| 25 | +## Setup |
| 26 | + |
| 27 | +1. First, log in or create an [Arduino account](https://app.arduino.cc/). |
| 28 | +2. Then install the [Cloud Agent](https://create.arduino.cc/getting-started/plugin/welcome). |
| 29 | +3. After installing the Cloud Agent, navigate to the [Cloud Editor](https://app.arduino.cc/sketches/). |
| 30 | +4. Now connect an Arduino board to your computer. Once you connect it, it should show up in the editor. |
| 31 | + |
| 32 | +  |
| 33 | + |
| 34 | +5. Finally, let's upload a sketch to your board. Click on the **"Examples"** icon, and navigate to **01.Basics > Blink**. Clicking the example will open a new window. Once open, click on the **"Upload"** button, and make sure to not disconnect your board during this process. |
| 35 | + |
| 36 | +  |
| 37 | + |
| 38 | +6. You can see if the operation was successful or not in the console log window at the bottom. Here's an example of a successful upload: |
| 39 | + |
| 40 | +  |
| 41 | + |
| 42 | +Congratulations, you have now successfully setup and used the Cloud Editor! In the next sections, you can learn a little bit more on what each of the elements in the editor works. |
| 43 | + |
| 44 | +## Cloud Editor Overview |
| 45 | + |
| 46 | +Now that we are all setup, let's take a look at the main components of the editor: |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | +1. **Arduino Cloud Menu** - navigation menu for the Arduino Cloud platform. |
| 51 | +2. **Examples** - a set of basic Arduino examples. |
| 52 | +3. **Libraries** - all libraries that are included in the Arduino library manager (5000+). |
| 53 | +4. **Reference** - the Arduino Reference provides an overview of the available methods in the Arduino programming API. |
| 54 | +5. **Editor** - the code editor area, where we write the program for our board. |
| 55 | +6. **Console Log** - this window informs you of the status of your compilation / upload. |
| 56 | +7. **Verify/Upload** - verify (compile) your code using the checkmark button, and upload it to your board using the right arrow. |
| 57 | +8. **Board / Port Selection** - the board connected to your computer will be automatically displayed here. You can also manually change this. |
| 58 | +9. **Serial Monitor** - a tool that reads serial data sent from your board to the computer. |
| 59 | + |
| 60 | +## Serial Monitor |
| 61 | + |
| 62 | +The Serial Monitor is a tool that allows you to read serial data from your board. This is useful for any general debugging cases, such as checking if a block of code is executed, or making sure the values you are using are accurate. |
| 63 | + |
| 64 | +To use the tool, you will need a board connected to your computer that sends serial data, and a sketch that prints something. For this tutorial, the following sketch was used, which simply prints `Hello World!` every second. |
| 65 | + |
| 66 | +```arduino |
| 67 | +void setup() { |
| 68 | + Serial.begin(9600); |
| 69 | +} |
| 70 | +
|
| 71 | +void loop() { |
| 72 | + Serial.println("Hello World!"); |
| 73 | + delay(1000); |
| 74 | +} |
| 75 | +``` |
| 76 | + |
| 77 | +When clicking the Serial Monitor button, a new window will open, where you can see the incoming data. See the image below for a complete overview of its functions: |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | +In the Serial Moitor window you can: |
| 82 | +- Read incoming data, |
| 83 | +- Change baud rate (default is 9600), |
| 84 | +- Enable time stamp, |
| 85 | +- Download the data as `.csv`, |
| 86 | +- Pause the stream, and search through the log, |
| 87 | +- Clear the log. |
| 88 | + |
| 89 | +***Note that the Serial Monitor opens as a new window.*** |
| 90 | + |
| 91 | +## Resources |
| 92 | + |
| 93 | +The resources (examples, libraries & reference) are all available from the menu on the left hand side. |
| 94 | + |
| 95 | +### Examples |
| 96 | + |
| 97 | +The "built-in examples" are a set of basic examples focused at teaching some key Arduino concepts. Classic examples such as `Blink` and `AnalogReadSerial` will help you get started, with links inside each example to more detailed documentation. |
| 98 | + |
| 99 | + |
| 100 | + |
| 101 | +### Library Manager |
| 102 | + |
| 103 | +The library manager allows you to search & browse through all availables that exist in the Arduino Library Manager, which as of 2024 was 5000+. |
| 104 | + |
| 105 | +Most libraries provide examples, which can be accessed be clicking the three dots next to a library. There is no need for downloading any library as they are available and up to date in the Arduino Cloud platform. |
| 106 | + |
| 107 | + |
| 108 | + |
| 109 | +### Reference |
| 110 | + |
| 111 | +The reference is an embedded version of the [Arduino Language Reference](https://www.arduino.cc/reference/en/), which helps you understand the Arduino programming language & syntax. |
| 112 | + |
| 113 | + |
0 commit comments