Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/pita_api/mod.ts>IO#setActive

API for Pita projects, simpliest way to develop secure and powerful webapps for redpitaya.
Latest
method IO.prototype.setActive
import { IO } from "https://deno.land/x/pita_api@0.9.1/mod.ts";

Set the state of the IO. Only for Analog IOs.

Examples

Example 1

analogIn1.setActive(true)
//analog in 1 start to acquire
await analogIn1.read() //ok
analogOut1.setActive(false)
//analog in 1 stop to acquire
await analogIn1.read() //error

Parameters

active: boolean
  • The "active" parameter enable or disable the analog IO.