# Make it Spin!

{% hint style="success" %}
[Make it Spin!](https://docs.revrobotics.com/rev-hardware-client-2/home/run-motor) For REV Hardware Client 2 is available.
{% endhint %}

## Power On

Now that the device is wired, and the connections carefully checked, power on the robot. You should see the SPARK Flex slowly blinking its for a new device the color will be Magenta. If the LED is dark, or you see a different blink pattern, refer to the [Status LED ](https://docs.revrobotics.com/brushless/spark-flex/status-led)guide for troubleshooting.&#x20;

{% hint style="info" %}
If you are using a brushed motor, you may see a sensor error. This is expected until you configure the device to accept a brushed motor in the following steps.
{% endhint %}

## Connect to the SPARK Flex

Plug in the USB cable and start the REV Hardware Client. Select the SPARK Flex from the Connected Hardware

<figure><img src="https://4148826207-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe0CWwhMSoCEH7NLVoLhF%2Fuploads%2F4Tqgy62q2f2ZyzG1vpV4%2Frhc%20flex.jpg?alt=media&#x26;token=52a1deb1-ab1f-4db8-b081-9f5795cafe57" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If you cannot see the SPARK Flex, make sure that the SPARK Flex is not being used by another application. Then unplug the SPARK Flex from the computer and plug it back in.
{% endhint %}

## Basic Setup and Configuration

Before any parameters can be changed, you **must** first assign a unique CAN ID to the device. This can be any number between 1 and 63. After setting a unique CAN ID, the user interface will refresh and allow you to change other parameters.

<figure><img src="https://4148826207-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe0CWwhMSoCEH7NLVoLhF%2Fuploads%2FOy8jfxYKruJrOXLtnLQl%2Fflex%20CAN%20ID.jpg?alt=media&#x26;token=a5bef490-0f45-4ca1-8a93-fa16704d067c" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Eventually you may set up a CAN network on your test bench or robot. Be sure each device on the network has a unique CAN ID. It is helpful to label each device with its ID number to aid in troubleshooting.
{% endhint %}

### Set the Motor Type

If you are using a NEO Vortex, NEO, or NEO 550, verify that the motor type is set to **REV NEO Brushless**, Sensor Type is **Hall Effect**, and the LED is blinking Magenta or Cyan.

<figure><img src="https://4148826207-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe0CWwhMSoCEH7NLVoLhF%2Fuploads%2FsZOXTXJcg9TrfDHdGsKh%2Fflex%20motor%20type.jpg?alt=media&#x26;token=0d8bc652-6fc8-4298-83c9-eba3ffc1e1f5" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If you see a *Sensor Fault* blink code, make sure the Motor Interface Connector is properly seated.
{% endhint %}

{% hint style="warning" %}
The ability to run a Brushed motor using a SPARK Flex will not be available until the release of the SPARK Flex Dock.
{% endhint %}

### Suggested Current Limits

Your ideal current limit may vary based on your specific application, but these values can be used as a starting point to reduce the chance of an overload on your motor as you begin tuning your specific mechanism's Smart Current Limit.

| Motor Type                                                        | Current Limit Range |
| ----------------------------------------------------------------- | ------------------- |
| NEO Vortex                                                        | 80A                 |
| NEO ([REV-21-1650](https://www.revrobotics.com/rev-21-1650/))     | 40A - 60A           |
| NEO 550 ([REV-21-1651](https://www.revrobotics.com/rev-21-1651/)) | 20A - 40A           |

{% hint style="warning" %}
Warning: Setting current limits outside of the suggested ranges listed above may cause unintended overload and severe damage to components that are not covered by warranty.
{% endhint %}

<figure><img src="https://4148826207-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe0CWwhMSoCEH7NLVoLhF%2Fuploads%2F9w2s3073Q5immZQ5limB%2Fflex%20smart%20current.jpg?alt=media&#x26;token=96fa567e-97b7-4cfd-b53d-b192d58c6169" alt=""><figcaption></figcaption></figure>

## Save the Settings

The settings must be saved for the SPARK Flex to remember its new configuration through a power cycle. To do this, press the *Burn Flash* button at the bottom of the page. It will take a few seconds to save, indicated by the loading symbol on the button.

{% hint style="warning" %}
As of REV Hardware Client version 1.7.0, "Burn Flash" has been renamed to "Persist Perimeters"!
{% endhint %}

<figure><img src="https://4148826207-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe0CWwhMSoCEH7NLVoLhF%2Fuploads%2FrwhsWd8ysCoN74zmZsfw%2FSave%20settings%20SPARK%20Flex.png?alt=media&#x26;token=ca14ffa6-eae2-4726-bac9-b18e11a58964" alt=""><figcaption></figcaption></figure>

Any settings saved this way will be remembered when the device is powered back on. You can always restore the factory defaults if you need to reset the device.

## Spin the Motor

{% hint style="danger" %}
Before running any motor, make sure all components are in a safe state, that the motor is secured, and that anyone nearby is aware. FRC motors are very powerful and can quickly cause damage to people and property.&#x20;
{% endhint %}

{% hint style="info" %}
Keep the CAN cable disconnected throughout the test. For safety reasons, the REV Hardware Client will not run the motor if the roboRIO is connected. If the roboRIO was connected, power cycle the SPARK Flex.
{% endhint %}

To spin the motor, go to the Run tab, keep all of the default settings and press *Run* *Motor.* The *setpoint* is 0 by default, meaning that the motor is being commanded to **idle** (0% power). When you press *Run* you should see the LED go from slow blinking to solid, indicating that the motor is idling.

<figure><img src="https://4148826207-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe0CWwhMSoCEH7NLVoLhF%2Fuploads%2FfCX7ChKAvEMziVLI7VOF%2Fflex%20motor%20running.jpg?alt=media&#x26;token=0b970da6-5b01-4258-9e5a-b9b1c4b8e5cf" alt=""><figcaption></figcaption></figure>

**Slowly** ramp the setpoint slider up. The motor should start to spin and you should see a green blink pattern proportional to the speed you have set to the motor. Slowly ramp the slider down. The motor should spin in reverse, and you should see a red blink pattern proportional to the speed you have set to the motor.

If you are unable to spin the motor, visit our[ troubleshooting guide](https://docs.revrobotics.com/brushless/spark-flex/troubleshooting).
