Create a New Code Project

  1. Right-click on a component in Breadboard View and select Add Code, which will attach a code project to that component and open up the code IDE

    Screen Shot 2022-02-27 at 3.54.51 PM.png

Using the File Explorer to Navigate, Add, and Remove Code Files

  1. The File Explorer can be found to the left inside the IDE

    1. The code project has a root folder (initially, this folder is called sketch). The root sketch folder is also initially set up with an Arduino sketch.ino file
    2. You can add folders and files within this root folder.
      1. To add a folder, right click the sketch folder and select New Folder
      2. To add a file, right click the sketch folder and select New File

    Screen Shot 2022-02-27 at 4.09.11 PM.png

Compiling and Uploading Arduino Code

  1. You have the ability to compile and upload your code to Arduino Microcontroller boards

    1. Before compiling, make sure to select the Arduino board you are writing code for. The first dropdown lets you select the Arduino microcontroller.

    2. Before uploading code to an Arduino board, make sure to also select the port that the board is connected to from the second dropdown.

    3. You can compile your code by clicking Compile, and you can compile and upload your code to an Arduino board by clicking Upload

      Screen Shot 2022-02-27 at 3.56.16 PM 2 2.png

    4. The results of compiling are displayed in a Serial Console

      Screen Shot 2022-02-27 at 4.16.50 PM.png

    Using Arduino Libraries

    1. A number of third-party libraries are available to use in your Arduino Sketch project. You can access these libraries from the Library Manager tab

      Screen Shot 2022-02-27 at 4.19.28 PM.png

    2. You can search for a specific library via the search box

    3. If the library is not yet installed, you can install the library by selecting Install

      Screen Shot 2022-02-27 at 4.23.05 PM.png

      1. The results of the library installation are displayed in the Serial Console

        Screen Shot 2022-02-27 at 4.21.42 PM.png

    4. You can add a library to your current code file by clicking Include Library, which will add the needed library includes to the top of your code file

      Screen Shot 2022-02-27 at 4.24.59 PM.png

Serial Monitor

  1. In case you want to send and receive serial data from an Arduino board, there is also a serial monitor inside the IDE.
  2. To use the serial monitor
    1. First select the port of the board you are connecting to from the Port dropdown

    2. Then click Open Serial Monitor, which will open the serial monitor at the bottom of the IDE

      Screen Shot 2022-02-27 at 4.32.31 PM.png

    3. Make sure to select the correct baud rate from the baud rate dropdown so that messages are sent and received from the Arduino correctly. The baud rate is typically specified in the Arduino Sketch setup function.

      Screen Shot 2022-02-27 at 4.35.29 PM.png

    4. Messages received from the Arduino are printed to the monitor

    5. You can also send messages to the Arduino by typing a message into the Message field and pressing Send

  3. If you disconnect and reconnect the Arduino to your computer (with the Serial Monitor open), or if the serial monitor does not appear to be working correctly, you can try to refresh the connection by clicking Refresh Serial Connection, which will attempt to reconnect to the Arduino board