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

x/pita_api/mod.ts>Channel#writeSlice

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

Writes a slice of points to dac.

Examples

Example 1

import { randomIntArray } from 'https://deno.land/x/denum@v1.2.0/mod.ts'
//DAC 16bits @ 125MHz
//Set voltage for 1µs
const voltage = randomIntArray(0, 2 ** 16, 125)
await dac1.writeSlice(voltage)

Parameters

buffer: number[]
  • Buffer to write.

Returns

Promise<Mode extends IOMode.RO ? never : void>