Uniot Docs
  • Introduction
  • Guides
    • Getting Started
    • Uniot Badge
    • Device Network
  • Foundations
    • Edge Logic Deployment
  • General Concepts
    • Primitives
    • Scripting
  • Platform
    • Dashboard
    • Sandbox
      • Visual Editor
        • Special
        • Logic
        • Math
        • Loops
        • Text
        • Variables
        • Functions
        • Primitives
      • Logger
      • Emulator
      • Control Panel
  • Advanced
    • Uniot Core
      • Scheduler
        • TaskScheduler
        • IExecutor
        • ISchedulerConnectionKit
        • Task
        • SchedulerTask
      • AppKit
        • AppKit
        • LispDevice
        • LispPrimitives
        • TopDevice
      • CBORWrapper
        • CBORObject
        • COSE
        • COSEMessage
        • ICOSESigner
      • Date
        • Date
        • SimpleNTP
      • EventBus
        • EventBus
        • IEventBusConnectionKit
        • DataChannels
        • EventEmitter
        • EventListener
        • EventEntity
        • CallbackEventListener
      • Hardware
        • Button
      • LispWrapper
        • DefaultPrimitives
        • LispHelper
        • PrimitiveExpeditor
        • unLisp
      • MQTTWrapper
        • CallbackMQTTDevice
        • MQTTDevice
        • MQTTKit
        • MQTTPath
      • Network
        • ConfigCaptivePortal
        • NetworkController
        • NetworkScheduler
      • Register
        • GpioRegister
        • ObjectRegister
        • ObjectRegisterRecord
        • Register
        • RegisterManager
        • RegisterManagerProxy
      • Storage
        • CBORStorage
        • CrashStorage
        • Storage
        • WifiStorage
      • Utils
        • Array
        • Bytes
        • ClearQueue
        • IterableQueue
        • LimitedQueue
        • GlobalBufferMemoryManager
        • Map
        • Singleton
        • TypeId
      • Credentials
    • Uniot Lisp
      • Language Description
      • Embedding Instructions
  • API
    • MQTT Convention
Powered by GitBook
On this page
  1. Advanced
  2. Uniot Core
  3. AppKit

LispPrimitives

The LispPrimitives namespace encapsulates a set of functions that implement fundamental hardware interactions as Lisp primitives within the Uniot Core. These primitives allow Lisp scripts to control hardware resources dynamically, such as digital and analog I/O operations and button interactions. Providing these primitives enables flexible and programmable hardware control through Lisp scripting.

Methods:

  • Object dwrite(Root root, VarObject env, VarObject list) Implements the digital write primitive, allowing Lisp scripts to set the state of a specified GPIO pin. It validates the pin number and desired state before performing the operation.

  • Object dread(Root root, VarObject env, VarObject list) Implements the digital read primitive, enabling Lisp scripts to read the current state of a specified GPIO pin. It validates the pin number and retrieves the pin's state.

  • Object awrite(Root root, VarObject env, VarObject list) Implements the analog write primitive, allowing Lisp scripts to set the analog value of a specified GPIO pin. It validates the pin number and value before performing the operation.

  • Object aread(Root root, VarObject env, VarObject list) Implements the analog read primitive, enabling Lisp scripts to read the current analog value of a specified GPIO pin. It validates the pin number and retrieves the pin's analog value.

  • Object bclicked(Root root, VarObject env, VarObject list) Implements the button clicked primitive, allowing Lisp scripts to check if a specific button has been clicked. It validates the button ID and retrieves the click status.

PreviousLispDeviceNextTopDevice

Last updated 5 months ago