# Connect and Upload

<figure><img src="https://409642222-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3MZhIYg7iSyaPwgNKY%2Fuploads%2FO9k1eygfqsDQnRmqfwE8%2Fuploading.png?alt=media&#x26;token=274e5c9e-8c5f-42ef-8040-9c2963eacda8" alt=""><figcaption></figcaption></figure>

### Connect

{% stepper %}
{% step %}
Use a USB cable to connect the micro-controller to your computer
{% endstep %}

{% step %}
Open the microcontroller settings window by going to Hardware > Microcontroller Settings or click the settings icon in the toolbar on the left side
{% endstep %}

{% step %}
Click on the add button (+) and select the right port from the list. Use the refresh button next to the dropdown to list all available ports.

![Microcontroller settings](https://409642222-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3MZhIYg7iSyaPwgNKY%2F-MjioAJerc-vkVxAIOfO%2F-MjitLnCiLvYYoiy9GEk%2Fconnect_new_microcontroller.png?alt=media\&token=145c7d23-5cda-4c89-9dba-987b1b1a0785)
{% endstep %}

{% step %}
Select the corresponding vendor of the microcontroller and press the save button

A new microcontroller will be added to microcontroller list in the window
{% endstep %}

{% step %}
The number of pole-pairs needs to be specified for the motor to operate correctly (default: 7) [find the number of pole-pairs for your motor](https://docs.feelix.xyz/hardware-support/hardware)
{% endstep %}

{% step %}
The supply voltage should match the voltage used to power the motor (default: 12V)
{% endstep %}
{% endstepper %}

### Check hardware settings

{% stepper %}
{% step %}
Access the **settings window** by going to *Hardware > Microcontroller Settings* or click the *settings icon* in the toolbar on the left side. For each motor the settings can be specified here.
{% endstep %}

{% step %}

#### Pole-pairs&#xD;

Make sure to set the right number of pole-pairs in the hardware settings ([see connect and upload](https://docs.feelix.xyz/hardware-support/hardware)).
{% endstep %}

{% step %}

#### Calibration (optional)

To (re)calibrate the motor, use the **UPDATE** button next to **zero electric angle**. This method will calculate the offset between the motor poles and the sensor, and the orientation of the sensor in relation to the motor poles.

Calibration will be done automatically when uploading for the first time.

<figure><img src="https://409642222-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M3MZhIYg7iSyaPwgNKY%2Fuploads%2FopcjcMsDSfmR8kaZIitA%2Fmicrocontroller_settings.png?alt=media&#x26;token=6dc7705d-96d1-4738-9382-33df797667b3" alt=""><figcaption><p>Hardware settings</p></figcaption></figure>
{% endstep %}
{% endstepper %}

### Upload

{% stepper %}
{% step %}
**Select the desired port** from the dropdown

![The added microcontroller will be visible in the 'select port' dropdown above the collections. ](https://409642222-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3MZhIYg7iSyaPwgNKY%2F-MjioAJerc-vkVxAIOfO%2F-MjivCB4_BY9VlLKhG0G%2Fselect_mcu_collection.png?alt=media\&token=5da1d2bd-63e7-4659-921e-bb95c87734a7)
{% endstep %}

{% step %}
**Render** the collection (button: ↺)
{% endstep %}

{% step %}
Click **upload** (button: ⇑)

Uploading will start if the selected microcontroller is connected with USB.\
The upload progress is visible in the status bar at the bottom of the window.
{% endstep %}
{% endstepper %}

{% hint style="warning" %}
**Make sure the Serial Monitor of the Arduino IDE is closed**, otherwise the Feelix Haptic Design Tool will not be able to connect with the microcontroller.
{% endhint %}

{% content-ref url="troubleshoot" %}
[troubleshoot](https://docs.feelix.xyz/uploading-files/troubleshoot)
{% endcontent-ref %}
