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
  • set
  • get
  • change
  • Dropdown Menu
  1. Platform
  2. Sandbox
  3. Visual Editor

Variables

PreviousTextNextFunctions

Last updated 2 months ago

Variables allow you to store, retrieve, and manipulate data within the script. They are essential for keeping track of changing values, such as sensor readings, user inputs, or counters.

Note: Before using a variable, you typically create it through a corresponding section in the toolbox. Once created, it can be used and modified throughout your program. Variables are case-sensitive and should have meaningful names to make your code easier to understand.

set

Creates a new variable or changes an existing variable's value.

Parameters:

  • Variable Name (String): The name of the variable to set.

  • Value (Any type): The value to store in the variable.

Example:

get

Retrieves the current value of a variable.

Parameters:

  • Variable Name (String): The name of the variable whose value you want to access.

Returns:

  • Any type: The current value of the specified variable.

Example:

change

Modifies a numeric variable by adding a value to it.

Parameters:

  • Variable Name (String): The name of the variable to modify.

  • Value (Number): The amount to add to the variable.

Example:

Dropdown Menu

The variable dropdown menu provides options to:

  • Select existing variables

  • Rename selected variable

  • Delete selected variable

Renaming or deleting a variable affects all blocks that use that variable.

Setting variables
Getting variable values
Modifying variables