# Set Up Datastreams

## **Add Datastream**

For the goal of this tutorial skip the Metadata Tab and go directly to Datastreams tab in your Template.

Datastreams are channels that are used to send data between the device and Blynk.Cloud. We will be using this Datastream to send random values from your device.

Click on **Add Datastream** button. Choose **Virtual Pin** in the dropdown menu:

<figure><img src="https://1839001309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBFTVMf7L6S67HOuqVC%2Fuploads%2F6ImHCnxjUJVPpp1PZEKU%2F9-templ%20quick%20setup-datastreams%201.png?alt=media&#x26;token=dc3f5084-1e58-4345-af5c-b8cb68528f3f" alt=""><figcaption></figcaption></figure>

Set up the Datastream like this:

<figure><img src="https://1839001309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBFTVMf7L6S67HOuqVC%2Fuploads%2FRZs9CKylQzE6RBK4ZqUS%2F10-templ%20quick%20setup-datastream%20propert%201.png?alt=media&#x26;token=c5386acb-afb0-4168-a38b-564f94b6f4ae" alt=""><figcaption></figcaption></figure>

* **Name:** Random Value Send
* **Virtual Pin:** V0
* **Data Type:** Integer
* **Min/Max:** 0/100

Skip all the other settings. When done, press Create and the new Datastream will be created.

These settings mean that all the devices that inherit this Template will process `integers` in the range of `0 to 100` through a `Virtual Pin V0`

## **Add a Second Datastream**

Click on **Add Datastream** button again. Choose **Enumerable** type in the dropdown menu and set up the Datastream. We will be using this Datastream to send a value from mobile and web dashboards to the device.

<figure><img src="https://1839001309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBFTVMf7L6S67HOuqVC%2Fuploads%2FBoDzeJkwtG3i1h3vHtUq%2F11-templ%20quick%20setup-datastream%20enumer%201.png?alt=media&#x26;token=8acdba11-cc9c-480d-92c5-785363fc413d" alt=""><figcaption></figcaption></figure>

* **Name:** Button
* **Virtual Pin:** V1
* Add **Row1:** 0, OFF
* Add **Row2:** 1, ON

Skip all the other settings and press **Create**

These settings mean that all devices that inherit this Template will process values `integers` in the range of `0 to 1` through a `Virtual Pin V1`and Blynk will interpret `0` as `OFF` and `1` as `ON` strings.
