user-img

Theremino Automation

  • 1 Projects
  • 1 Followers
  • Jan 11,2025
+ Follow

The most simple and powerful language for automation.

Main advantages of THEREMINO AUTOMATION LANGUAGE ● Simplicity: The language is easy to learn, with a small set of keywords. It runs on Windows 10/11. ● Versatility: It can handle a wide range of automation tasks, from simple control sequences to complex interactions with hardware. ● Flexibility: The system can be used with a variety of hardware components and systems, and can communicate with other applications via slots. ● Accessibility: It is designed for those who do not have in-depth knowledge of programming, allowing a wide range of users to implement their ideas. ● Open Source: The Theremino system is open source and free. In summary, this language is a powerful and accessible that can allow technology enthusiasts to bring their projects to life. It combines simplicity and versatility and can be a valuable tool for a wide variety of automation tasks. If you know the basics of programming and are not a professional programmer, this language is perfect for you.

The most simple and powerful language for automation.
 
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
 

Story

The Theremino Automation language is a simplified programming language designed to be easy to use, even for those without prior programming experience. It allows for complex operations, such as audio and video playback or web browsing, with single instructions. The language is interpreted, meaning instructions are read and executed during runtime, which can make it slower than compiled languages. However, the speed is still sufficient for its intended tasks.
Core Principles
Simplicity: The language has a minimal set of about twenty keywords. It lacks complex mechanisms like classes, types, structures, or threads.
Accessibility: The goal is to simplify programming, making it easier for beginners to understand and use.
Flexibility: Despite its simplicity, it enables complex tasks including audio, video, and web navigation.
Modularity: The system is designed to integrate with other Theremino components and applications.
Open Source and Free: The system is free to use, with no copyright restrictions, promoting collaboration and knowledge-sharing.
Language Structure
Theremino Automation programs typically consist of an initialization section followed by procedures.
Initialization: The program begins with an initialization section, which usually ends with a STOP instruction. This section is for setting up the program and any initial parameters.
Procedures: Procedures begin with a LABEL and are executed when called by buttons or other events. These procedures are like functions and are called when a specific event occurs.
Key Concepts
Keywords: The language uses a small set of keywords that are easy to remember and use. These keywords are displayed on the bottom bar of the application.
Instructions can be quickly written by clicking on the keywords in the bottom bar.
Interpreted Language: Theremino Automation is an interpreted language, where instructions are not precompiled but are read and interpreted character by character during execution.
Slower Execution: Interpreted languages are slower compared to compiled languages. Theremino Automation is approximately ten times slower than instructions written in Visual Studio. However, this speed is sufficient for the simple tasks the language is intended for.
Main Loop: Events such as button presses and keyboard inputs interrupt the main loop of the program. These events should be executed as quickly as possible.
Variables: The language uses predefined numerical (v1 to v99) and string (s1 to s99) variables. Users can define additional variables with the Variable keyword.
Variables that are not initialized contain the value zero or an empty string.
Care should be taken to use different variables in each function (unless they are used to communicate values).
Arrays: Numeric arrays named Array1 to Array9 are available from version 7.8 and simplify operations that were difficult in earlier versions.
Slots: Slots are a central element of the Theremino system, used for communication. Numerical slots are accessed with the Slot keyword and text slots are accessed with SlotText. It is assumed that users of the language understand the functionality of slots.
Debugging: The software includes a debug panel, which helps to understand the values of variables during execution. The debug panel shows the values of variables, expressions, and slots, updated in real time.
Text Box: There is a text box that can be used to display multiple lines of text using the Print command. The Controls OpenTextBox command opens the text box, while Controls CloseTextBox closes it. The text box can be resized by dragging the gray bar separating it from the program area.
File Handling: The system supports saving and loading slot values using Load Slots and Save Slots commands, and also includes functions for file and path manipulation.
Key Instructions
Here are the main instructions in the Theremino Automation Language:
Array: Defines numeric arrays from Array1 to Array9.
Beep: Emits a basic system sound, or a pure sinusoidal sound with adjustable frequency and duration, or a series of sounds with specified frequencies and durations.
Button: Creates buttons on the left side of the window which execute the corresponding LABEL when pressed. Up to 120 buttons can be displayed with custom text labels.
When a button is pressed while the program is stopped, the program text scrolls to highlight the corresponding LABEL.
Buttons can be pressed while the program is running by pressing CTRL and then the button. The scroll function must be disabled to use this.
Controls: Used to control the mouse cursor position and the text box.
Controls OpenTextBox opens the text box for displaying text.
Controls CloseTextBox closes the text box.
For - Next: Creates loops. The variable can be incremented or decremented by one unit at each loop cycle. It can also create infinite loops if the end value is set to 9e99 or "Infinity".
Exit: Used to exit prematurely from a For-Next loop, jumping to the instruction following Next.
If - EndIf: Conditional statements to execute code based on a condition.
Key: Executes code when specific keys are pressed on the keyboard. It includes a wide range of keys from numbers and letters to function keys, arrow keys, and modifiers such as shift and control.
The instruction Option GlobalKeys Enabled enables the Key instruction to always be active.
Label: Marks a specific line of code with a unique name, used for jumping to specific sections of the program. The label can be any number of alphanumeric characters without spaces or double quotes.
Label EventStop: This label is called automatically whenever the program is stopped (either manually or with the End instruction). It can also be called using Gosub EventStop, Button EventStop, or Key EventStop.
Label EventTimer: This label is executed at timed intervals, but it can interrupt the program at different points and should be used with caution.
Load: Opens files, folders, applications, or web pages.
Load CloseApps closes all applications opened with Load.
Load Slots loads slot values from the "_Slots.txt" file
Load (WEB address) opens a web page. The address must begin with http://.
Load ".." will load the folder above the current application folder.
Load CloseApps Windows closes the Windows operating system. This command shuts down the P.
MoveTo: Command used to move motors. This is often used with the SendCommand to send the command to the robot or other external system.
Option: Modifies global program settings, like transparency, speed or global keys. Options are usually written at the start of a program before the Stop instruction.
Option Transparency n sets program transparency with a number from 0 to 9.
PressKeys: Sends keyboard characters and commands to the system as though they were typed. Characters and commands must be separated by spaces.
Print: Displays text or numerical values in the application's lower status bar.
Save: Saves slot values and variable values.
Save Slots saves the values of all slots in the "_Slots.txt" file.
Save Vars saves the values of all predefined variables in the "_Vars.txt" file.
SendCommand: Sends commands to the COBOT or other connected applications.
SendKeys: Similar to PressKeys, but can write text without spaces, and commands must be within curly brackets (e.g., SendKeys ABCD{ENTER} ).
Slot: Reads and writes to numerical slots, which are central to communication within the Theremino system.
SlotText: Reads and writes text strings to slots, used for communication with other applications.
Stop: Pauses program execution but continues to respond to keyboard input, button presses and slot changes.
End: Stops the program completely. To restart, the RUN button needs to be pressed.
TTS (Text to Speech): Converts text to speech using the computer's text-to-speech capabilities.
TTS SelectVoice "xxxx": Selects the voice used for speech.
TTS SetVolume n: Sets the volume of the text to speech from 0 to 100.
TTS SetSpeed n: Sets the speed of the text to speech from -10 to 10.
TTS Speak "xxx": Speaks the text "xxx.
TTS SpeakWait "xxx": Speaks the text "xxx" and waits for it to finish before continuing.
TTS Stop: Immediately stops the speech.
TTS Pause: Pauses the speech.
TTS Resume: Resumes the paused speech.
TTSvoices: Lists the installed voices.
TTSlanguage: Responds with the ISO name (ENG, CHI...) of the voice.
TTSready: Responds with "True" when TTS is inactive.
TTSpaused: Responds with "True" when TTS is paused.
TTSspeaking: Responds with "True" when TTS is speaking.
Variable: Defines both numerical and string variables.
Wait: Pauses the program until a specific condition is met.
Wait Seconds 1.53: Waits for 1.53 seconds.
Wait Button "Button 1": Waits for the button "Button 1" to be pressed.
Wait Slot(4) > 500: Waits for the value of slot 4 to become greater than 500.
Wait AppRunning("xx.exe"): Waits until application "xx.exe" is running.
Wait Not AppRunning("xx.exe"): Waits until application "xx.exe" is terminated.
Wait Application xx.exe: Waits until application "xx.exe" is closed.
Communication with COBOT
The Theremino Automation language can send and receive commands with the TWinGo COBOT.
Commands from COBOT to Automation: Commands from the COBOT are sent as text strings and are processed without regard to case.
Commands from Automation to COBOT: Commands from the Automation application to the COBOT are sent using Slot_CommandsToCobot and Slot_CobotResponses variables, along with the SlotText command. A list of supported commands can be found in the documentation.
Functions
Theremino Automation includes a variety of functions:
Mathematical Functions: Includes trigonometric, logarithmic, and other mathematical functions.
String Functions: Functions to manipulate strings like Left, Mid, Len, Trim, PadLeft, PadRight, UCase, LCase, and Replace.
Date and Time Functions: Provides functions to work with dates and times.
Mouse Functions: MouseX, MouseY, MouseXP, and MouseYP return mouse cursor positions on the screen as normalized values, useful for input like a joystick or potentiometers.
Media Functions: Functions are provided to control media playback including:
MediaLength: returns the total length of the media file in seconds.
MediaPosition: Returns the current position of the media file in seconds.
MediaPlaying: Returns TRUE if the file is playing or FALSE if finished.
File and Path Functions: Functions like SelectFile, GetFileNames, and GetFolderNames are available for working with files and directories.
Debugging Tools
Debug Panel: The debug panel allows monitoring of variables, slots and other values during program execution. Breakpoints can be set and watched and values can be inspected by moving the mouse cursor over the variables in the code. Watches update in real time, even when the program is stopped.
Additional Features
Full Screen: The program can display full screen video, images, web pages and even the program code.
Menu Access: A menu, accessed by right clicking or tapping the screen, allows for operations like opening the debug window, resizing the window, managing the text box, and stopping the program.
Find and Replace: The Find and Replace windows allow searching for and replacing words or phrases in the program code.
Auto-Completion: Pressing ENTER on a line with For, If, Label, or Select will auto-complete the code structure.
Programming Techniques
Program Examples: Theremino Automation includes many program examples in various folders.
Modular Programming: The use of labels and functions allows for modular program design.
Event-Driven Programming: Programs respond to events such as button presses, keyboard inputs, and slot changes.
Limitations
Limited Instructions: The language has a small set of instructions, which might be limiting for very complex programs.
No Complex Data Structures: The language does not support complex data structures like classes or structures.
Slower Execution Speed: Being an interpreted language, it is slower than compiled languages.
Ideal for Simpler Tasks: For more advanced projects requiring thousands of lines of code, it's recommended to switch to more powerful programming environments, such as Visual Studio.
Conclusion
The Theremino Automation Language is a simple yet powerful tool for creating automation programs. Its ease of use, combined with its ability to integrate with other components, makes it a good choice for educational purposes and for those new to programming. Its limitations mean that it may be best suited to smaller programs that may not need the full power and complexity of a more conventional language.
Code
  • THEREMINO LANGUAGE MANUAL

    Theremino_Automation_Help_ENG_20407107536781e310efb2f.zip
    Download(2)

The most simple and powerful language for automation.

Main advantages of THEREMINO AUTOMATION LANGUAGE ● Simplicity: The language is easy to learn, with a small set of keywords. It runs on Windows 10/11. ● Versatility: It can handle a wide range of automation tasks, from simple control sequences to complex interactions with hardware. ● Flexibility: The system can be used with a variety of hardware components and systems, and can communicate with other applications via slots. ● Accessibility: It is designed for those who do not have in-depth knowledge of programming, allowing a wide range of users to implement their ideas. ● Open Source: The Theremino system is open source and free. In summary, this language is a powerful and accessible that can allow technology enthusiasts to bring their projects to life. It combines simplicity and versatility and can be a valuable tool for a wide variety of automation tasks. If you know the basics of programming and are not a professional programmer, this language is perfect for you.

78
 
1
0
0

Share your project on social media to expand its influence! Get more people to support it.

  • Comments( 0 )
  • Like( 1 )
/1000
Upload a photo:
You can only upload 1 files in total. Each file cannot exceed 2MB. Supports JPG, JPEG, GIF, PNG, BMP

You May Also Like

View All
Add to cart
Board Type : GerberFile :
Layer : Dimensions :
PCB Qty :
Different PCB Design
PCB Thickness : PCB Color :
Surface Finish : Castellated Hole :
Copper Weight : 1 oz Production Time :
Total: US $
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.

PCB Assembly

PCBA Qty: BomFile:
NO. OF UNIQUE PARTS: NO. of Components:
Assembly Cost: US $
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
3dPrintingFile : Size :
Unit : Volumn :
3D Printing Qty : Material :
Total: US $12.99
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
Acrylic Type : AcrylicFile :
Dimensions: Engrave:
Acrylic Qty :
Acrylic Thickness:
Acrylic Color:
Total: US $12.99
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
CNC Milling File : Size:
Unit: Volumn:
CNC Milling Qty : Material:
Type of Aluminum: Surface Finish:
Tolerance:
Surface Roughness:
Total: US $12.99
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
Item Price Qty Subtotal Delete
Total: US $0.00
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.