Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
display.clear | Not specified expect => V1.0.0 | Clears the display. | None | None | display.clear() |
display.display | Not specified expect => V1.0.0 | Updates the display with the newest buffer. | None | None | display.display() |
display.loadingLogo | Not specified expect => V1.0.0 | Displays the loading logo. | None | None | display.loadingLogo() |
display.statusBar | >= V1.3.0 Stable | Adds the status bar to the buffer. | Int: withtime (optional) | None | display.statusBar(1) |
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
display.printCenterText | Not specified expect => V1.0.0 | Prints centered text. | String: text, Int: y | None | display.printCenterText("Hello World!", 10) |
display.printText | Not specified expect => V1.0.0 | Displays text. | String: text, Int: x, Int: y, Int: size | None | display.printText("Hello World!", 10, 10, 1) |
display.displayScrolableText | Not specified expect => V1.0.0 | Displays scrollable text. Changes the passed in table. Pass the table in a loop of displaying it it will take care of timings. | a table { y:int *the y pos of text* , text: String *text*, scrolled = 0 *do not change*, scrollspeed: int *reccomended is 200 ms* , scrolledon = 0 *do not change*, scrolldirection = false *do not change*, texttoprint = "" *do not change*, maxchars : int *maxchars 20 is all lenght*, x : int *if -1 its going to center*} | None | local scrolabletext = { y = 28, text = "Hello World!", scrolled = 0, scrollspeed = 200, scrolledon = 0, scrolldirection = false, texttoprint = "", maxchars = 20, x = -1} while do display.displayScrolableText("Hello World!") system.delay(100) end |
display.showLargeText | Not specified expect => V1.0.0 | Displays a menu for showing text that wouldnt normally fit on screen. | String: text | None | display.showLargeText("Hello World!") |
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
display.drawRectangle | Not specified expect => V1.0.0 | Draws a rectangle. | Int: fromx, Int: tox, Int: fromy, Int: toy, Int: color, Int: filled | None | display.drawRectangle(10, 20, 10, 20, 1, 1) |
display.drawRoundRectangle | Not specified expect => V1.0.0 | Draws a rounded rectangle. | Int: fromx, Int: tox, Int: fromy, Int: toy, Int: color, Int: filled, Int: round | None | display.drawRoundRectangle(10, 20, 10, 20, 1, 1, 5) |
display.drawCircle | Not specified expect => V1.0.0 | Draws a circle. | Int: onx, Int: ony, Int: color, Int: filled, Int: radius | None | display.drawCircle(20, 20, 1, 1, 10) |
display.setPixel | Not specified expect => V1.0.0 | Sets a pixel. | Int: x, Int: y, Int: color | None | display.setPixel(10, 10, 1) |
display.drawLine | Not specified expect => V1.0.0 | Draws a line. | Int: fromx, Int: fromy, Int: tox, Int: toy, Int: color | None | display.drawLine(10, 10, 20, 20, 1) |
display.drawBitmap | Not specified expect => V1.0.0 | Draws an icon. | Table: icon, Int: x, Int: y, Int: sizex, Int: sizey | None | display.drawBitmap({0xFF,0xFA,0xFA,0xFA,0xFA,0xFF}, 10, 10, 8, 6) |
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
display.getWhiteMode | Not specified expect => V1.0.0 | Gets the white mode. | None | None | display.getWhiteMode() |
display.getWhiteColour | Not specified expect => V1.0.0 | Gets the white color. | None | None | display.getWhiteColour() |
display.getBlackColour | Not specified expect => V1.0.0 | Gets the black color. | None | None | display.getBlackColour() |
display.loadWhiteMode | Not specified expect => V1.0.0 | Loads the white mode. | None | None | display.loadWhiteMode() |
display.autotextcolour | >= V1.0.0 Stable | Sets the auto text color. | None | None | display.autotextcolour() |
display.setBackground | >= V1.0.0 Stable | Sets the background color. | None | None | display.setBackground() |
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
display.yesOrNoMenu | >= V1.0.0 Stable | Displays a yes or no menu. | String: prompt | Bool: yes | display.yesOrNoMenu("Prompt") |
display.getString | >= V1.0.0 Stable | Gets a string from the user. | String: prompt | String: message | display.getString("Enter your name:") |
display.menu | >= V1.0.0 Stable | Shows the menu. | Array: options | chosen id (0-inf) -1 == no selection USE FOR EXIT !!! WARNING NOT LUA ID C++ ID IS LESS BY 1 | display.menu(["Option 1","Option 2"]) |
display.sentenceBuilder | >= V1.3.0 Stable | Shows the sentence builder. | None | String: message | display.sentenceBuilder() |
display.sentenceBuilderUpdate | >= V1.3.0 Stable | Updates the sentence builder with a new url. If the url is 'Default' it will use the default sentences. | String: url | Bool: success | display.sentenceBuilderUpdate("https://example.com/sentences.json") |
Note | Description | Types |
---|---|---|
Colors | The colors used in the display module are defined as follows: |
|
Sentence Builder syntax | The sentence builder uses a specific syntax for its sentences. Each sentence can contain words, directories, and loops. The syntax is as follows: |
|
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
wifi.require | Not specified expect => V1.0.0 | Asks user to connect to wifi proceeds if connected | None | int: canProceed | wifi.require() |
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
wifi.connect | Not specified expect => V1.0.0 | Connects to a wifi network. | String: ssid, String: password | int: did it succed | wifi.connect("ssid","password") |
wifi.connectForgot | Not specified expect => V1.0.0 | Connects to a wifi network and doesnt save password and name. | String: ssid, String: password | int: did it succed | wifi.connectForgot("ssid","password") |
wifi.displaySavedNetworks | Not specified expect => V1.0.0 | Displays all saved wifi networks. And prompts to connect to one | None | int: did it succed | wifi.displaySavedNetworks() |
wifi.ssid | Not specified expect => V1.0.0 | Gets the SSID of the currently connected network. (if the ssid is "" not connected) | None | String: SSID | wifi.ssid() |
wifi.rssi | Not specified expect => V1.0.0 | Gets the RSSI (signal strenght) of the currently connected network. | None | Int: RSSI | wifi.rssi() |
wifi.autoconnect | Not specified expect => V1.0.0 | Connects to the saved network with the highest signal strength. | None | int: did it succed | wifi.autoconnect() |
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
wifi.wifiScanMenu | Not specified expect => V1.0.0 | Scans for wifi networks. | None | None | wifi.wifiScanMenu() |
wifi.scan | Not specified expect => V1.0.0 | Scans for wifi networks and returns a table of SSID, RSSI, and encryption type. | None | table: ssid, table: rssi, table: encryption | local ssidTable, rssiTable, encryptionTable = wifi.scan() |
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
wifi.tcpCreateClient | Not specified expect => V1.0.0 | Creates a new TCP client. | None | Bool: success | wifi.tcpCreateClient() |
wifi.tcpConnect | Not specified expect => V1.0.0 | Establishes a secure TCP connection to a server. | Int: client ID, String: host, Int: port | Bool: success | wifi.tcpConnect(client,"example.com", 80) |
wifi.tcpSend | Not specified expect => V1.0.0 | Sends data over a secure TCP connection. | Int: client ID, String: data | Bool: success | wifi.tcpSend(client,"Hello, world!") |
wifi.tcpReceive | Not specified expect => V1.0.0 | Receives data over a secure TCP connection. | Int: client ID | String: data | local data = wifi.tcpReceive(client) |
wifi.tcpReceiveChar | Not specified expect => V1.0.0 | Receives a single character over a secure TCP connection. | Int: client ID | String: character | local character = wifi.tcpReceiveChar(client) |
wifi.tcpClose | Not specified expect => V1.0.0 | Closes a secure TCP connection. | Int: client ID | Bool: success | wifi.tcpClose(client) |
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
wifi.tcpCreateClientUnsafe | Not specified expect => V1.0.0 | Creates a new TCP client. | None | Bool: success | local client = wifi.tcpCreateClientUnsafe() |
wifi.tcpConnectUnsafe | Not specified expect => V1.0.0 | Establishes a TCP connection to a server. | Int: client ID, String: host, Int: port | Bool: success | wifi.tcpConnectUnsafe(client,"example.com", 80) |
wifi.tcpSendUnsafe | Not specified expect => V1.0.0 | Sends data over a TCP connection. | Int: client ID, String: data | Bool: success | wifi.tcpSendUnsafe(client,"Hello, world!") |
wifi.tcpReceiveUnsafe | Not specified expect => V1.0.0 | Receives data over a secure TCP connection. | Int: client ID | String: data | local data = wifi.tcpReceiveUnsafe(client) |
wifi.tcpReceiveCharUnsafe | Not specified expect => V1.0.0 | Receives a single character over a secure TCP connection. | Int: client ID | String: character | local character = wifi.tcpReceiveCharUnsafe(client) |
wifi.tcpCloseUnsafe | Not specified expect => V1.0.0 | Closes a secure TCP connection. | Int: client ID | Bool: success | wifi.tcpCloseUnsafe(client) |
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
wifi.tcpCreateServer | >= V1.3.0 Stable | Creates a new TCP server. | None | Int: server ID | local serverID = wifi.tcpCreateServer() |
wifi.tcpStartServer | >= V1.3.0 Stable | Starts a TCP server. | Int: server ID, Int: port | Bool: success | local success = wifi.tcpStartServer(serverID, 8080) |
wifi.tcpAcceptClient | >= V1.3.0 Stable | Accepts a client connection on a TCP server. | Int: server ID | Int: client ID | local clientID = wifi.tcpAcceptClient(serverID) |
wifi.tcpSendToClient | >= V1.3.0 Stable | Sends data to a client connected to a TCP server. | Int: client ID, String: data | Bool: success | local success = wifi.tcpSendToClient(clientID, "Hello, Client!") |
wifi.tcpReceiveFromClient | >= V1.3.0 Stable | Receives data from a client connected to a TCP server. | Int: client ID, Int: timeout (optional) | String: data | local data = wifi.tcpReceiveFromClient(clientID, 5000) |
wifi.tcpReceiveCharFromClient | >= V1.3.0 Stable | Receives a single character from a client connected to a TCP server. | Int: client ID, Int: timeout (optional) | String: character | local char = wifi.tcpReceiveCharFromClient(clientID, 5000) |
wifi.tcpReceiveBufferFromClient | >= V1.3.0 Stable | Receives a buffer of data from a client connected to a TCP server. | Int: client ID, Int: timeout (optional), Int: buffer size (optional) | String: data | local buffer = wifi.tcpReceiveBufferFromClient(clientID, 5000, 1024) |
wifi.tcpCloseClient | >= V1.3.0 Stable | Closes a client connection on a TCP server. | Int: client ID | Bool: success | local success = wifi.tcpCloseClient(clientID) |
wifi.tcpClientConnected | >= V1.3.0 Stable | Checks if a client is connected to a TCP server. | Int: client ID | Bool: connected | local isConnected = wifi.tcpClientConnected(clientID) |
wifi.tcpClientPort | >= V1.3.0 Stable | Gets the port number of a client connected to a TCP server. | Int: client ID | Int: port | local port = wifi.tcpClientPort(clientID) |
wifi.tcpStopServer | >= V1.3.0 Stable | Stops a TCP server. | Int: server ID | Bool: success | local success = wifi.tcpStopServer(serverID) |
wifi.tcpGetClientIP | >= V1.3.0 Stable | Gets the IP address of a client connected to a TCP server. | Int: client ID | String: IP address | local clientIP = wifi.tcpGetClientIP(clientID) |
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
wifi.apStart | >= V1.1.0 Stable | Starts the access point mode. | String: ssid, String: password | Bool: success | wifi.apStart("MyAP", "password") |
wifi.apStop | >= V1.1.0 Stable | Stops the access point mode. | None | Bool: success | wifi.apStop() |
wifi.apNumConnected | >= V1.1.0 Stable | Returns the number of connected clients. | None | Int: number of connected clients | local num = wifi.apNumConnected() |
wifi.apSSID | >= V1.1.0 Stable | Returns the current SSID of the access point. | None | String: SSID | local ssid = wifi.apSSID() |
Note | Description | Types |
---|---|---|
Encryption Types | The encryption type returned by the `scan` function can be one of the following: |
|
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
espnow.require | Not specified expect => V1.0.0 | Asks user to enable espnow proceeds if enabled | None | int: canProceed | espnow.require() |
espnow.addPeer | Not specified expect => V1.0.0 | Add a peer to the list of peers | String: peers mac | int: did it succed | espnow.addPeer("peer") |
espnow.myMac | Not specified expect => V1.0.0 | Returns the Devices MAC address | None | String: mac | espnow.myMac() |
espnow.getMac | Not specified expect => V1.0.0 | Prompts the user to enter a mac adress. | SString: prompt | String: mac | espnow.getMac("Enter mac:") |
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
espnow.CallbackForATT | Not specified expect => V1.0.0 | Enables the callback (adding to queue) | None | int: did it succed | espnow.CallbackForATT() |
espnow.getQueuedATT | Not specified expect => V1.0.0 | Gets the newest message in the queue | None | String: macaddress , String: attachment (name of it), String: message, String: type (like you can use it like: on off change) | espnow.getQueuedATT() |
espnow.sendATT | Not specified expect => V1.0.0 | Sends an attachment to a peer | String: peers mac, String: message , String: atachment (name of it), String: type (on off change etc.) | None | espnow.sendATT("mac","message","attachment *Car Remote etc.*","type *on off change etc.*") |
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
espnow.CallbackForDTD | Not specified expect => V1.0.0 | Enables the callback (adding to queue) | None | int: did it succed | espnow.CallbackForDTD() |
espnow.sendDTD | Not specified expect => V1.0.0 | Sends a message to a peer | String: peers mac, String: message, String type | None | espnow.sendDTD("mac","message","type") |
espnow.getQueuedDTD | Not specified expect => V1.0.0 | Gets the newest message in the queue | None | String: macaddress ,String:deviceName (senders device name), String: message, String: type | espnow.getQueuedDTD() |
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
espnow.socketCreate | >= V1.3.0 Stable | Creates a new ESP-NOW socket connection. | String: macStr | Bool: success | espnow.socketCreate("xx:xx:xx:xx:xx:xx") |
espnow.socketDestroy | >= V1.3.0 Stable | Destroys an existing ESP-NOW socket connection. | String: macStr | Bool: success | espnow.socketDestroy("xx:xx:xx:xx:xx:xx") |
espnow.socketWrite | >= V1.3.0 Stable | Writes data to an ESP-NOW socket connection. | String: macStr, String: message | Bool: success | espnow.socketWrite("xx:xx:xx:xx:xx:xx", "Hello, world!") |
espnow.socketReadLine | >= V1.3.0 Stable | Reads a line of data from an ESP-NOW socket connection. | String: macStr | String: line | espnow.socketReadLine("xx:xx:xx:xx:xx:xx") |
espnow.socketReadUntil | >= V1.3.0 Stable | Reads data from an ESP-NOW socket connection until a specified character is encountered. | String: macStr, Char: chartoend | String: data | espnow.socketReadUntil("xx:xx:xx:xx:xx:xx", "\n") |
espnow.socketRead | >= V1.3.0 Stable | Reads data from an ESP-NOW socket connection. | String: macStr | String: data | espnow.socketRead("xx:xx:xx:xx:xx:xx") |
espnow.socketAvailable | >= V1.3.0 Stable | Checks if there is available data to read from an ESP-NOW socket connection. | String: macStr | Int: available | espnow.socketAvailable("xx:xx:xx:xx:xx:xx") |
espnow.socketCount | >= V1.3.0 Stable | Gets the number of active ESP-NOW socket connections. | None | Int: count | espnow.socketCount() |
espnow.socketList | >= V1.3.0 Stable | Gets a list of active ESP-NOW socket connections. | None | Table: connections | espnow.socketList() |
Note | Description | Types |
---|---|---|
ESP-NOW Data structures | ESP-NOW uses the following data structures to store data: |
|
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
http.get | Not specified expect => V1.0.0 | Sends a GET request. | String: url, Int: expectedCode | String: the response ("Error" if failed) | http.get("url", 200) |
http.post | Not specified expect => V1.0.0 | Sends a POST request. | String: url, Int: expectedCode, String: data | String: tzhe response ("Error" if failed) | http.post("url", 200, "data") |
http.unsafeGet | Not specified expect => V1.0.0 | Sends an insecure GET request. | String: url, Int: expectedCode | String: the response ("Error" if failed) | http.unsafeGet("url", 200) |
http.unsafePost | Not specified expect => V1.0.0 | Sends an insecure POST request. | String: url, Int: expectedCode, String: data | String: the response ("Error" if failed) | http.unsafePost("url", 200, "data") |
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
notification.add | Not specified expect => V1.0.0 | Adds a notification. | String: title, String: message, Int: displayTime (ms) | None | notification.add("title", "message", 1000) |
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
system.time | Not specified expect => V1.0.0 | Gets the system time. | None | bool: succeded, int: year, int: month, int: dayoftheweek 0-7 , int: month day, int: year day, int: hour, int: minute, int: second | local succeded, year, month, dayoftheweek, dayofthemonth, dayoftheyear, hour, minute, second = system.time() |
system.delay | Not specified expect => V1.0.0 | Delays the system. | Int: delayTime | None | system.delay(1000) |
system.millis | Not specified expect => V1.0.0 | Gets the number of milliseconds since the system started. | None | Int: milliseconds | local ms = system.millis() |
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
system.saveData | Not specified expect => V1.0.0 | Saves data to the storage. | String: value | None | system.saveData("value") |
system.loadData | Not specified expect => V1.0.0 | Loads data from the storage. | None | String: value | system.loadData() |
system.dataPublicRamSave | >= V1.3.0 Stable | Saves data to the public ram. | String: key, String: value | None | system.dataPublicRamSave("key", "value") |
system.dataPublicRamLoad | >= V1.3.0 Stable | Loads data from the public ram. | String: key | String: value | system.dataPublicRamLoad("key") |
system.dataPublicRamDelete | >= V1.3.0 Stable | Deletes data from the public ram. | String: key | None | system.dataPublicRamDelete("key") |
system.dataPublicRamClear | >= V1.3.0 Stable | Clears all data from the public ram. | None | None | system.dataPublicRamClear() |
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
system.random | Not specified expect => V1.0.0 | Generates a random number. | Int: min, Int: max | Int: random number | system.random(1, 10) |
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
system.version | Not specified expect => V1.0.0 | Returns the version of the operating system. | None | String: version | system.version() |
system.os_name | Not specified expect => V1.0.0 | Returns the name of the operating system. | None | String: os name | system.os_name() |
system.distro | Not specified expect => V1.0.0 | Returns the name of the system distribution (Beta , Stable). | None | String: distro name | system.distro() |
system.splitVersion | >= V1.3.0 Stable | Gives a split version of the system. (distro, major, minor, patch, prefix) | None | String: distro, Int: major, Int: minor, Int: patch, String: prefix | local distro, major, minor, patch, prefix = system.splitVersion() |
system.isSupported | >= V1.3.0 Stable | Checks if the current version is higher than the version provided. | String: major, String: minor, String: patch, String: prefix (the prefix wont be accounted for stable but still needs to be provided) | Bool: is supported | local isSupported = system.isSupported("1", "3", "0", "E") |
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
input.aBtn | Not specified expect => V1.0.0 | Checks if button A is held. | None | bool: is held | input.aBtn() |
input.bBtn | Not specified expect => V1.0.0 | Checks if button B is held. | None | bool | input.bBtn() |
input.cBtn | Not specified expect => V1.0.0 | Checks if button C is held. | None | bool: is held | input.cBtn() |
input.dBtn | Not specified expect => V1.0.0 | Checks if button D is held. | None | bool: is held | input.dBtn() |
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
input.stopPressing | Not specified expect => V1.0.0 | Waits till the user stops pressing the buttons | None | None | input.stopPressing() |
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
log.info | Not specified expect => V1.0.0 | Sends [INFO]:appname:<text> to the console. | String: text | None | log.info("Text") |
log.debug | Not specified expect => V1.0.0 | Sends [DEBUG]:appname:<text> to the console if debug enabled. | String: text | None | log.debug("Text") |
log.error | Not specified expect => V1.0.0 | Sends [ERROR]:appname:<text> to the console. | String: text | None | log.error("Text") |
log.warning | Not specified expect => V1.0.0 | Sends [WARNING]:appname:<text> to the console. | String: text | None | log.warning("Text") |
log.warn | Not specified expect => V1.0.0 | Sends [WARNING]:appname:<text> to the console. | String: text | None | log.warn("Text") |
log.critical | Not specified expect => V1.0.0 | Sends [CRITICAL]:appname:<text> to the console. | String: text | None | log.critical("Text") |
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
json.stringify | Not specified expect => V1.0.0 | stringifys a table to a JSON string. | Table: table | String: JSON string | json.stringify({"key": "value"}) |
json.parse | Not specified expect => V1.0.0 | parses a JSON string to a table. | String: JSON string | Table: table | json.parse("{\"key\": \"value\"}") |
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
algo.aes | >= V1.2.0 Stable | Encrypts/decrypts data using AES in ECB or CBC mode | Int: mode (0=ECB, 1=CBC), String: key, String: data | String: encrypted/decrypted data | local encrypted = algo.aes(0, key, 'Secret message') |
algo.aesKeygen | >= V1.2.0 Stable | Generates a random AES key of specified length | Int: keySize (128, 192, or 256 bits) | String: generated key | local key = algo.aesKeygen(256) |
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
algo.sha256 | >= V1.2.0 Stable | Computes SHA-256 hash of input data | String: data | String: 64-character hex hash | local hash = algo.sha256('data') |
algo.sha512 | >= V1.2.0 Stable | Computes SHA-512 hash of input data | String: data | String: 128-character hex hash | local hash = algo.sha512('data') |
algo.sha1 | >= V1.2.0 Stable | Computes SHA-1 hash of input data | String: data | String: 40-character hex hash | local hash = algo.sha1('data') |
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
algo.rsaKeygen | >= V1.2.0 Stable | Generates RSA public/private key pair | Int: keySize (2048 or higher) | String: publicKeyPEM, String: privateKeyPEM | local pub, priv = algo.rsaKeygen(2048) |
algo.rsaEncrypt | >= V1.2.0 Stable | Encrypts data using RSA public key | String: publicKeyPEM, String: message | String: encrypted data | local encrypted = algo.rsaEncrypt(pubKey, 'secret') |
algo.rsaDecrypt | >= V1.2.0 Stable | Decrypts data using RSA private key | String: privateKeyPEM, String: encryptedData | String: decrypted message | local decrypted = algo.rsaDecrypt(privKey, encrypted) |
algo.rsaSign | >= V1.3.0 Stable | Signs SHA256 hash using RSA private key | String: privateKeyPEM, String: hash | String: signature | local signature = algo.rsaSign(privKey, hash) |
algo.rsaVerify | >= V1.3.0 Stable | Verifies SHA256 hash signature using RSA public key | String: publicKeyPEM, String: hash (SHA256), String: signature | Bool: success | local success = algo.rsaVerify(pubKey, hash, signature) |
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
algo.packetize | >= V1.3.0 Stable | Takes a table and a packetsize and outputs a packet not nested not key pair | Int: packetsize,Table: data | String: packet | local packet = algo.packetize(10, {"value1", "value2"}) |
algo.depacketize | >= V1.3.0 Stable | Takes a packet and outputs a table | String: packet | Table: data | local data = algo.depacketize(packet) |
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
algo.tampcompress | >= V1.3.0 Stable | Compresses a string using the Tamp algorithm. (input string to uint8_t to output string) | String: data | String: compressed data | local compressed = algo.tampcompress('Hello World') |
algo.tampdecompress | >= V1.3.0 Stable | Decompresses a string using the Tamp algorithm. (input string to uint8_t to output string) | String: compressedData | String: decompressed data | local decompressed = algo.tampdecompress(compressed) |
algo.lzwcompress | >= V1.3.0 Stable | Compresses a string using the lzw algorithm. | String: data, String: dict_size (optional 4096) | String: compressed data | local compressed = algo.lzwcompress('Hello World') |
algo.lzwdecompress | >= V1.3.0 Stable | Decompresses a string using the lzw algorithm. | String: compresseddata, String: dict_size (optional 4096) | String: decompressed data | local decompressed = algo.lzwdecompress(compressed) |
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
ezui.textBox | >= V1.3.0 Stable | Creates a text box. | Int: x, Int: y, Int: width, Int: height, String: text | None | ezui.tbx(10, 10, 100, 50, "Hello World") |
ezui.textBoxWithBorder | >= V1.3.0 Stable | Creates a text box with a border. | Int: x, Int: y, Int: width, Int: height, String: text | None | ezui.tbxb(10, 10, 100, 50, "Hello World") |
ezui.textBoxWithBorderAndBackground | >= V1.3.0 Stable | Creates a text box with a border and a background. | Int: x, Int: y, Int: width, Int: height, String: text | None | ezui.tbxbab(10, 10, 100, 50, "Hello World") |
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
ezui.drawGraph | >= V1.3.0 Stable | Creates a graph. | Table: data (table of numbers),Int: x, Int: y, Int: width, Int: height | None | ezui.dg(10, 10, 100, 50, {1, 2, 3, 4, 5}) |
Function | Version | Description | Parameters | Returns | Example |
---|---|---|---|---|---|
ezui.progressBar | >= V1.3.0 Stable | Creates a progress bar. | Int: x, Int: y, Int: width, Int: height, Int: progress (0-100) | None | ezui.pb(10, 10, 100, 50, 50) |
Function | Description | Parameters | Returns | Example |
---|---|---|---|---|
mainmenu | Gets called on the main menu if the user enables the startup option in the app manager. | None | None | function mainmenu() end |
widget | Gets called repeatedly when a widget is opened. | None | None | function widget() end |
main | Gets called if the user runs the app. | None | None | function main() end |