diff --git a/apps.json b/apps.json index 14feabe80..eb9b7b6a3 100644 --- a/apps.json +++ b/apps.json @@ -1987,5 +1987,19 @@ "storage": [ {"name":"gpsautotime.wid.js","url":"widget.js"} ] + }, + { "id": "espruinoctrl", + "name": "Espruino Control", + "shortName":"Espruino Ctrl", + "icon": "app.png", + "version":"0.01", + "description": "Send commands to other Espruino devices via the Bluetooth UART interface. Customisable commands!", + "tags": "", + "readme": "README.md", + "custom": "custom.html", + "storage": [ + {"name":"espruinoctrl.app.js"}, + {"name":"espruinoctrl.img","url":"app-icon.js","evaluate":true} + ] } ] diff --git a/apps/espruinoctrl/ChangeLog b/apps/espruinoctrl/ChangeLog new file mode 100644 index 000000000..5560f00bc --- /dev/null +++ b/apps/espruinoctrl/ChangeLog @@ -0,0 +1 @@ +0.01: New App! diff --git a/apps/espruinoctrl/README.md b/apps/espruinoctrl/README.md new file mode 100644 index 000000000..a7bca662c --- /dev/null +++ b/apps/espruinoctrl/README.md @@ -0,0 +1,28 @@ +# Espruino Control + +Send commands to other Espruino devices via the Bluetooth UART interface. + +## Customising + +Click the customise button and you can customise your commands +with 4 options: + + +* **Title** - The title of the menu item that will be displayed +* **Command** - The JS command to execute, eg. `LED.toggle()` +* **MAC Address** - If specified, of the form `aa:bb:cc:dd:ee:ff`. The device +with this address will be connected to directly. If not specified a menu +showing available Espruino devices is popped up. +* **RX** - If checked, the app will display any data received from the +device being connected to. Use this if you want to print data - eg: `print(E.getBattery())` + +When done, click 'Upload'. Your changes will be saved to local storage +so they'll be remembered next time you upload from the same device.s + +## Usage + +Simply load the app and you'll see a menu with the menu items +you defined. Select one and you'll be able to connect to the device +and send the command. + +If a command should wait for a response then diff --git a/apps/espruinoctrl/app-icon.js b/apps/espruinoctrl/app-icon.js new file mode 100644 index 000000000..70d2dd062 --- /dev/null +++ b/apps/espruinoctrl/app-icon.js @@ -0,0 +1 @@ +require("heatshrink").decompress(atob("mEwhH+AH4A/AH4A/AH4AFwIuuAAIllAAYIGF041IF34AKqwuuAANXF9QuCAANdGHqQgGBwvdGCIud5mjGB4udAAIwPFz3MSR61VFxQwNci4vGeh4uXGAguHGBK3WGA4AIegtXc69dGBxoBGAouWO4IwNe4gwZa4YwLFwikEFzAwLFwwwCFzQwKFw68YGB4AdF5AwmF5IwlF5QwkF5Yw/F8IwEL9WBB4IuuADwuzGxAugFAgliGBYutAH4A/AH4A/ADA=")) diff --git a/apps/espruinoctrl/app.png b/apps/espruinoctrl/app.png new file mode 100644 index 000000000..900861e43 Binary files /dev/null and b/apps/espruinoctrl/app.png differ diff --git a/apps/espruinoctrl/custom.html b/apps/espruinoctrl/custom.html new file mode 100644 index 000000000..e6297cf2e --- /dev/null +++ b/apps/espruinoctrl/custom.html @@ -0,0 +1,275 @@ + + + + + + + + +

Enter the menu items you'd like to see appear in the app below. MAC Address is the MAC address + of the device to use. If it isn't specified then a menu will be presented showing available devices.

+
+ + + + + + + + + + + + +
TitleCommandMAC AddressRX
+
+

+ + + + + +