1# i2c_write_bit
2
3## Description
4
5Writes a bit to a device register. Communicates with the device directly using
6the [I2C interface](i2c_interface.md).
7
8## Properties
9
10| Name     | Required | Type   | Description                                                                                                 |
11| :------- | :------: | :----- | :---------------------------------------------------------------------------------------------------------- |
12| register |   yes    | string | Device register address expressed in hexadecimal. Must be prefixed with 0x and surrounded by double quotes. |
13| position |   yes    | number | Bit position value from 0-7. Bit 0 is the least significant bit.                                            |
14| value    |   yes    | number | Value to write: 0 or 1.                                                                                     |
15
16## Return Value
17
18true
19
20## Example
21
22```json
23{
24  "i2c_write_bit": {
25    "register": "0xA0",
26    "position": 3,
27    "value": 0
28  }
29}
30```
31