To add a new node, complete the following steps:
- In the Nodes View area, hover over the toolbar.
Several toolbar buttons appear. -
Click the Add Node button (the plus icon).
The Add Node quick pick menu appears.
-
In the quick pick menu, follow the quick pick flow to add the node. This flow is different depending on the node type you are adding.
As an example, the following steps describe adding a button:- Select the node category and the I/O pin. The lists are populated from the Zephyr and nRF Connect SDK devicetree type YAML files.
- Write the name of the new button node. This name is used in the devicetree structure. For example,
button_test. - Write the human-readable name of the button for the buttons label in the Devicetree Visual Editor. For example,
Test red button. - Write the human-readable name of the node. This name is used as the buttons label. For example,
button_4. - Select the pin to which the new node is going to be assigned. For example,
P1.02.
The node is added to the list of nodes and to the devicetree file, as you can see in the following image.
-
Save your changes either in the editor or in the devicetree file.
The node is added to the tree under the provided parent with an icon assigned automatically based on the node type.
You can also add nodes by clicking the Add Node button that appears when hovering over valid parent nodes in the Peripherals View or using the button that is available in the top right corner of both the Peripherals and Pins Views.