CxD Archive
Code: Robotics
Code: Robotics
  • Code Introduction
  • TUTORIALS
    • A. Meet Your Robot
      • A-1 Circuit Board
      • A-2 Motors and Wheels
      • A-3 Other Components
    • B. Hello World Test
      • B-1 Arduino Code Editor
      • B-2 New App Template
      • B-3 Global Variable
      • B-4 Setup Function
      • B-5 Loop Function
      • B-6 Upload App to Robot
      • B-7 Add Sound
      • B-8 Use Button
    • C. Driving and Turning
      • C-1 Driving
      • C-2 Turns (Pivoting)
      • C-3 Test Wheel Encoders
      • C-4 Drive for Specific Distance
      • C-5 Pivot By Specific Angle
      • C-6 Drive Straight Continuously
    • D. Detect Objects in Path
      • D-1 Test Mechanical Bumpers
      • D-2 Detect Collisions
      • D-3 Test Ultrasonic Sensor
      • D-4 Avoid Collisions
    • E. Detect Lines on Surface
      • E-1 Test IR Line Sensors
      • E-2 Follow Line
      • E-3 Avoid Line
      • E-4 Count Lines Crossed
      • E-5 Follow and Count Lines
    • F. Detect Other Conditions
      • F-1 Detect Surface Drop-Off
      • F-2 Test Accelerometer
      • F-3 Detect If Upside-Down
      • F-4 Detect If Bumped
  • REFERENCES
    • Arduino Language
    • Arduino Code Editor
      • Create New App
      • Save and Rename App
      • Include RedBot Library
      • Verify App Code
      • Upload App to Robot
      • Download Copy of App
      • Use Serial Monitor to View Data
      • Robot Demo App Template
    • Physical Inputs
      • Push Button (D12)
      • Mechanical Bumpers
      • IR Line Sensors
      • Wheel Encoders
      • Accelerometer
      • Ultrasonic Sensor *
    • Physical Outputs
      • LED Light (D13)
      • Speaker (Buzzer)
      • Motors
    • Robot Behaviors
      • Producing Alerts
      • Driving
      • Turning
      • Detecting Objects
      • Detecting Lines
      • Detecting Other Conditions
    • Navigation Modes
      • Distance Navigation
      • Line Counting Navigation
      • Line Following + Counting Navigation
      • Autonomous Navigation
  • LINKS
    • Robotics Project Guidebook
    • Arduino Create Web Editor
    • Arduino Language Reference
    • RedBot Experiment Guide
  • ELEGOO Experiments
    • Getting the Arduino IDE
    • Starting with the `techCar` Template
    • Template Code for techCar.ino
    • Template Experiments
    • Reinstall the Original Remote App Functionality, If Needed
Powered by GitBook
On this page
  • Save Your App Code
  • Arduino Create (Web Editor)
  • Arduino IDE (Desktop Editor)
  • Rename App
  • Arduino Create Web Editor
  • Arduino IDE Desktop Editor
  • Save Copy of App with New Name
  • Arduino Create Web Editor
  • Arduino IDE Desktop Editor
Export as PDF
  1. REFERENCES
  2. Arduino Code Editor

Save and Rename App

Save Your App Code

The Arduino code editor does NOT autosave as you type (though you can turn this feature on in the web editor), so be sure to periodically save your code as you work. However, the Arduino code editor will save your code when verifying or uploading it.

Arduino Create (Web Editor)

At the top of the code editor panel, hover your mouse cursor over the button with 3 dots, and then select "Save" from the pop-up menu.

TURN ON AUTOSAVE: You can turn on autosave in the Arduino Create web editor (but not the desktop editor). Click the Preferences menu in the left navigation to display its menu options. Be sure "Enable Autosave" and "Save when verifying and uploading" are both checked.

Arduino IDE (Desktop Editor)

Under the File menu, select "Save" – alternatively, you can click the Save icon (looks like a downward arrow) at the top of the code editor window.

Rename App

By default, a new sketch will be given a generic filename that starts with sketch_ and includes the current date (plus a letter, such as: a, b, c, etc.).

You should rename your new sketch to give it a filename that will make it easy for you (or anyone else) to identify and find the program later.

Arduino Create Web Editor

  1. Hover over the 3-dot button at the top of the code editor panel, and then select "Rename Sketch..."

  2. In the pop-up, replace the generic sketch name with a unique filename.

    • Use a name that will make it easy for anyone to identify this sketch later (especially once you have multiple sketches saved in your Arduino account).

    • The filename cannot contain spaces (instead you can use an underscore as a "space").

    • Your teacher might have a specific filename format that you should use for certain programs.

  3. Click the OK button to save the new name and close the pop-up.

Arduino IDE Desktop Editor

Rename New Program (not yet saved): Under the File menu, select "Save". A pop-up dialog window will appear. Enter a new filename, and then click the Save button.

Rename Existing Program (previously saved): Click the down arrow icon in the top-right corner of the code editor window, and then select "Rename" in the drop-down list. A small dialog will appear at the bottom of the code editor window. Enter a new filename, and then click the OK button.

Save Copy of App with New Name

You can use the "Save As" command to save a copy of an existing app as a new app with a different name. This is a useful way to copy an app and then modify its code.

Arduino Create Web Editor

  1. Hover over the 3-dot button at the top of the code editor panel, and then select "Save As."

  2. In the pop-up, replace the existing sketch name with a new filename.

  3. Click the OK button to save the new app and close the pop-up.

Arduino IDE Desktop Editor

Under the File menu, select "Save As". A pop-up dialog window will appear. Enter a new filename, and then click the Save button.

PreviousCreate New AppNextInclude RedBot Library

Last updated 6 years ago