# Bitmask Table

### Overview

This widget helps display a table of values as LED indicators. The hardware sends a bitmask value, which the server parses to update LED states automatically. Each bit represents the ON/OFF status of an LED on the corresponding row.

***

### What is a Bitmask?

A bitmask stores multiple true/false (binary) values in a single integer. Each bit represents a separate state (e.g., an error, alarm, or status).

* 1 = ON (True)
* 0 = OFF (False)

***

### How the Server Parses the Data

When the hardware sends a bitmask as an integer, the server extracts individual bit states to update the table.

#### Example

A device has 11 error states, each represented by a bit in a bitmask value. If an error occurs, the corresponding bit is set to 1, turning ON the LED in the respective row.

* Received Integer: 123
* Binary Representation: 1111011
* Mapped States:
  * Bit 0 → True
  * Bit 1 → True
  * Bit 2 → False
  * Bit 3 → True
  * Bit 4 → True
  * Bit 5 → True
  * Bit 6 → True
  * *(Other bits remain False)*

<figure><img src="/files/PAmfUf7CbmjZjsetSztE" alt=""><figcaption><p>Bitmask Table Data Flow Visualization</p></figcaption></figure>

***

### Settings

* Title – Optional widget title
* Datastream – Select the datastream receiving the bitmask

  *Only integer datastreams are supported*
* Label position – Labels on the left or right
* Hide false values – Hide rows with a false (0) value
* False color – LED color for false state
* True color – LED color for true state
* Bits mapping – Map bit indexes to specific rows
* Inverse values – Reverse 1 and 0 logic (ON becomes OFF)

{% hint style="warning" %}
Note: If your hardware sends bits that aren’t mapped in the widget settings, they will be ignored in the UI.
{% endhint %}

<figure><img src="/files/707XaIo7YCM5O5trFuyv" alt=""><figcaption><p>Bitmask Table Settings</p></figcaption></figure>

***

### Limits

* Only integer datastreams are supported
* Maximum of 50 rows
* Maximum label length: 100 characters

***

### Change Bitmask Table Properties from Hardware

Use this command in firmware to update widget properties:

```
Blynk.setProperty(vPin, "widgetProperty", "propertyValue");
```

* vPin: Virtual pin assigned to the widget
* widgetProperty: The property to change
* propertyValue: New value to assign<br>

{% hint style="danger" %}
Warning: Avoid placing Blynk.setProperty() in the loop() function — this may flood the server and disconnect your device. Use timers or event-based updates instead.
{% endhint %}

#### Changeable Properties

You can dynamically update these widget properties:

* label
* isHidden
* isDisabled

**Example (Firmware)**

```
Blynk.setProperty(V1, "isHidden", "true");
```

**Example (HTTP API)**

```
https://{server_address}/external/api/update/property?token={your_32_char_token}&pin=V1&isHidden=true
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.blynk.io/en/blynk.console/widgets-console/bitmask-table.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
