# Configure your Viam Rover with a fragment

To be able to drive your rover, you need to configure it. Viam provides reusable _fragments_ for [Viam rovers](/content/resources/rover/index.html).

## Prerequisites

- An assembled Viam Rover.  
  For assembly instructions, see [Unbox and set up your Viam Rover](https://docs.viam.com/try/viam-rover/setup/)  
- The board is connected to Viam.  
  To add your Pi to Viam, refer to [the rover setup guide](https://docs.viam.com/try/viam-rover/setup/#control-your-rover-on-viam).

## Add the fragment

Follow the appropriate instructions for the model of rover and board you have:

- [Viam Rover 2 (RPi 5)](https://docs.viam.com/try/viam-rover/fragments/#tabset-tryviam-roverfragments-1-0)
- [Viam Rover 2 (RPi 4)](https://docs.viam.com/try/viam-rover/fragments/#tabset-tryviam-roverfragments-1-1)
- [Viam Rover 1 (RPi 4)](https://docs.viam.com/try/viam-rover/fragments/#tabset-tryviam-roverfragments-1-2)
- [Viam Rover 2 (Jetson Nano)](https://docs.viam.com/try/viam-rover/fragments/#tabset-tryviam-roverfragments-1-3)
- [Viam Rover 2 (Jetson Orin Nano)](https://docs.viam.com/try/viam-rover/fragments/#tabset-tryviam-roverfragments-1-4)

Navigate to your machine’s page.
In the left-hand menu of the **CONFIGURE** tab, click the **+** (Create) icon next to the machine part you want to add the fragment to.

Select **Insert fragment**.  
Now, you can see the available fragments to add.  
Select [`ViamRover2-2024-rpi5`](https://app.viam.com/fragment/11d1059b-eaed-4ad8-9fd8-d60ad7386aa2/json) and click **Insert fragment** again to add the fragment to your machine configuration:

Click **Save** in the upper right corner of the page to save your new configuration.

The fragment adds the following components to your machine’s JSON configuration:

- A [board component](https://docs.viam.com/reference/components/board/) named `local` representing the Raspberry Pi.
- Two [motors](https://docs.viam.com/reference/components/motor/gpio/) (`right` and `left`)
  - The configured pin numbers correspond to where the motor drivers are connected to the board.
- Two [encoders](https://docs.viam.com/reference/components/encoder/single/), one for each motor
- A wheeled [base](https://docs.viam.com/reference/components/base/), an abstraction that coordinates the movement of the right and left motors
  - Width between the wheel centers: 356 mm
  - Wheel circumference: 381 mm
  - Spin slip factor: 1
- A webcam [camera](https://docs.viam.com/reference/components/camera/webcam/)
- An [accelerometer](https://github.com/viam-modules/tdk-invensense/)
- A [power sensor](https://github.com/viam-modules/texas-instruments/)

For information about how to configure components yourself when you are not using the fragment, click the links on each component above.  
To see the configured pin numbers and other values specific to this fragment, [view it in the app](https://app.viam.com/fragment?id=11d1059b-eaed-4ad8-9fd8-d60ad7386aa2).

## See the components on the configuration page

Adding a fragment to your machine adds the configuration to your machine.  
The components and services included in the fragment will now appear as cards on the **CONFIGURE** tab, along with a card for your fragment:

## Modify the config

The fragment you added is read-only, but if you need to modify your rover’s config you can [overwrite sections of the fragment](https://docs.viam.com/fleet/reuse-configuration/#override-specific-settings).

## Next steps

After you have configured your rover, follow this tutorial:

[Drive your rover](https://docs.viam.com/try/viam-rover/drive-rover/)  
Use a Viam SDK to program a rover to move in a square.
