Skip to main content

Acidity

caution

This service is experimental and may change in the future.

A sensor measuring water acidity, commonly called pH.

import { Acidity } from "@devicescript/core"

const acidity = new Acidity()

Registers

reading

The acidity, pH, of water.

  • type: Register<number> (packing format u4.12)

  • read only

import { Acidity } from "@devicescript/core"

const acidity = new Acidity()
// ...
const value = await acidity.reading.read()
  • track incoming values
import { Acidity } from "@devicescript/core"

const acidity = new Acidity()
// ...
acidity.reading.subscribe(async (value) => {
...
})
note

write and read will block until a server is bound to the client.

readingError

Error on the acidity reading.

  • type: Register<number> (packing format u4.12)

  • optional: this register may not be implemented

  • read only

import { Acidity } from "@devicescript/core"

const acidity = new Acidity()
// ...
const value = await acidity.readingError.read()
  • track incoming values
import { Acidity } from "@devicescript/core"

const acidity = new Acidity()
// ...
acidity.readingError.subscribe(async (value) => {
...
})
note

write and read will block until a server is bound to the client.

minReading

Lowest acidity that can be reported.

  • type: Register<number> (packing format u4.12)

  • optional: this register may not be implemented

  • constant: the register value will not change (until the next reset)

  • read only

import { Acidity } from "@devicescript/core"

const acidity = new Acidity()
// ...
const value = await acidity.minReading.read()
note

write and read will block until a server is bound to the client.

maxReading

Highest acidity that can be reported.

  • type: Register<number> (packing format u4.12)

  • optional: this register may not be implemented

  • constant: the register value will not change (until the next reset)

  • read only

import { Acidity } from "@devicescript/core"

const acidity = new Acidity()
// ...
const value = await acidity.maxReading.read()
note

write and read will block until a server is bound to the client.