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

x/pita_api/mod.ts

API for Pita projects, simpliest way to develop secure and powerful webapps for redpitaya.
Latest
import * as pitaApi from "https://deno.land/x/pita_api@0.9.1/mod.ts";

Pita api

Simpliest way to develop secure and powerful app for redpitaya.

Pita 🫓 api provide frontend proxy to Redpitaya low level API. Pita api allows you to manage your Redpitaya board without worring about backend, and with Pita cli, build and implement your webapp with a robust and secure environement. It handle all your workflow, from tooling installation to testing, benching and publishing.

Getting started

Example app taken from pita template.

import config from '@pita/project.json' assert { type: 'json' }
import { Project } from 'https://deno.land/x/pita_api/mod.ts'

const redpitaya = await Project.init(config)

await redpitaya.channel.dac1.writeSlice([0, 0, 0, 256, 256, 256, 0, 0, 0])
console.log('Gate signal on DAC 1')
await redpitaya.pin.digital.led1.write(true)
console.log('Led 1 is ON')

Classes

Interface for Redpitaya fast analog IOs.

Interface for Redpitaya digital and slow analog IOs.

Project represent the host configuration.

The Redpitaya class provides a way to exchange messages with a Redpitaya device and control its digital and analog inputs and outputs. Redpitaya class is a proxy for Redpitaya low level API.