commit c5d5c9d079986f183da4a426dba8ae61b6e0ec04 Author: Dmitriy Pleshevskiy Date: Mon Aug 23 23:28:41 2021 +0300 . diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..586c898 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +target.js \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..ff30c44 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "editor.tabSize": 2 +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..ac0c6ee --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Espruino starter + +This repository is a template that allows you to quickly start creating your new project on the espruino board or a board based on it. diff --git a/espruino.json b/espruino.json new file mode 100644 index 0000000..eb03efd --- /dev/null +++ b/espruino.json @@ -0,0 +1,34 @@ +{ + "espruino": { + "RESET_BEFORE_SEND": true, + "STORE_LINE_NUMBERS": true, + "ENV_ON_CONNECT": true, + "MODULE_URL": "https://www.espruino.com/modules", + "MODULE_EXTENSIONS": ".min.js|.js", + "MODULE_AS_FUNCTION": true, + "MODULE_PROXY_ENABLED": false, + "MODULE_PROXY_URL": "", + "MODULE_PROXY_PORT": "", + "BAUD_RATE": 9600, + "SERIAL_IGNORE": "/dev/ttyS*|/dev/*.SOC|/dev/*.MALS", + "SERIAL_FLOW_CONTROL": true, + "BLUETOOTH_LOW_ENERGY": true, + "SERIAL_AUDIO": "0", + "WEB_BLUETOOTH": true, + "WEB_SERIAL": true, + "BOARD_JSON_URL": "https://www.espruino.com/json", + "COMPILATION": true, + "COMPILATION_URL": "https://www.espruino.com/service/compiler", + "MINIFICATION_LEVEL": "", + "MODULE_MINIFICATION_LEVEL": "ESPRIMA", + "MINIFICATION_Mangle": true, + "PRETOKENISE": false, + "SAVE_ON_SEND": 0, + "SAVE_STORAGE_FILE": "myapp", + "LOAD_STORAGE_FILE": 2, + "SET_TIME_ON_WRITE": false, + "SERIAL_THROTTLE_SEND": false + }, + "ports": [], + "storageContents": {} +} \ No newline at end of file diff --git a/main.js b/main.js new file mode 100644 index 0000000..0b95a1c --- /dev/null +++ b/main.js @@ -0,0 +1,5 @@ +var on = false; +setInterval(function() { + on = !on; + LED1.write(on); +}, 500); \ No newline at end of file diff --git a/makefile b/makefile new file mode 100644 index 0000000..3d27d6b --- /dev/null +++ b/makefile @@ -0,0 +1,20 @@ +ESP := espruino -j espruino.json + +watch: build-w + +all: build + +build: clean + $(ESP) main.js -o target.js + +build-w: + $(ESP) main.js -w + +clean: + rm -f target.js + +ide: + $(ESP) --ide + +deps: + npm install -g espruino \ No newline at end of file