Enabling the Code View

You can write code to program mechatronic devices. The code shows the variables linking to different components.

You can switch between 3D view, 2D circuit view, and code view.

See Also
Creating 2D Circuit Views and 2D Wiring
  1. From the Mechatronics section of the action bar, click Part Supply and insert smart components.
    The components open in the 3D view.
  2. From the Mechatronics section of the action bar, click Code View .
    The component opens in code view. The code editor is read-only.

    You can view sample code automatically generated for each component.



    A toolbar appears on the top of the work area from which you can change the views, download the code, and change the theme.

    For details, see Mechatronics Toolbars.

  3. From the toolbar, select 2D Circuit and Code View .
    The component opens in the 2D circuit and code view.

  4. From the shortcut menu or action bar, select Autowire.
  5. Modify or delete a connected component from the 2D circuit.
    The sample code updates as per the modification in the 2D circuit.
  6. Optional: From the toolbar, select Download Code .
    The code is downloaded as an .INO file containing the sample code.