From 1026d48769c57b58959d9ec3cba27a2fc75d426f Mon Sep 17 00:00:00 2001 From: Alex Spataru Date: Thu, 7 Nov 2024 02:00:54 -0500 Subject: [PATCH 1/2] Add files via upload --- examples/MPU6050/MPU6050.json | 152 ++++++++++++++++++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 examples/MPU6050/MPU6050.json diff --git a/examples/MPU6050/MPU6050.json b/examples/MPU6050/MPU6050.json new file mode 100644 index 00000000..11b6e657 --- /dev/null +++ b/examples/MPU6050/MPU6050.json @@ -0,0 +1,152 @@ +{ + "actions": [ + ], + "decoder": 0, + "frameDetection": 1, + "frameEnd": "*/", + "frameParser": "/**\n * This function splits a data frame using the project-specified separator,\n * allowing you to customize frame parsing for different project requirements.\n *\n * Global variables can maintain a constant output array, enabling a single\n * Serial Studio project to display information consistently, even with varying\n * frame types.\n *\n * @param[in] frame The latest received frame as a string.\n * @param[in] separator The data separator defined in the JSON project.\n * @return Array of strings containing the parsed frame elements.\n *\n * @note Only data within the delimiters is processed.\n * @note Declare global variables outside @c parse() for state/configuration.\n *\n * @example\n * Given frame: \"value1,value2,value3\", separator: \",\"\n * Returns: [\"value1\", \"value2\", \"value3\"]\n */\nfunction parse(frame, separator) {\n return frame.split(separator);\n}\n", + "frameStart": "/*", + "groups": [ + { + "datasets": [ + { + "alarm": 0, + "fft": false, + "fftSamples": 1024, + "fftSamplingRate": 100, + "graph": true, + "index": 1, + "led": false, + "ledHigh": 1, + "log": false, + "max": 0, + "min": 0, + "title": "Accelerometer X", + "units": "m/s²", + "value": "", + "widget": "x" + }, + { + "alarm": 0, + "fft": false, + "fftSamples": 1024, + "fftSamplingRate": 100, + "graph": true, + "index": 2, + "led": false, + "ledHigh": 1, + "log": false, + "max": 0, + "min": 0, + "title": "Accelerometer Y", + "units": "m/s²", + "value": "", + "widget": "y" + }, + { + "alarm": 0, + "fft": false, + "fftSamples": 1024, + "fftSamplingRate": 100, + "graph": true, + "index": 3, + "led": false, + "ledHigh": 1, + "log": false, + "max": 0, + "min": 0, + "title": "Accelerometer Z", + "units": "m/s²", + "value": "", + "widget": "z" + } + ], + "title": "Accelerometer", + "widget": "accelerometer" + }, + { + "datasets": [ + { + "alarm": 0, + "fft": false, + "fftSamples": 1024, + "fftSamplingRate": 100, + "graph": true, + "index": 4, + "led": false, + "ledHigh": 1, + "log": false, + "max": 0, + "min": 0, + "title": "Gyro X", + "units": "deg/s", + "value": "", + "widget": "x" + }, + { + "alarm": 0, + "fft": false, + "fftSamples": 1024, + "fftSamplingRate": 100, + "graph": true, + "index": 5, + "led": false, + "ledHigh": 1, + "log": false, + "max": 0, + "min": 0, + "title": "Gyro Y", + "units": "deg/s", + "value": "", + "widget": "y" + }, + { + "alarm": 0, + "fft": false, + "fftSamples": 1024, + "fftSamplingRate": 100, + "graph": true, + "index": 6, + "led": false, + "ledHigh": 1, + "log": false, + "max": 0, + "min": 0, + "title": "Gyro Z", + "units": "deg/s", + "value": "", + "widget": "z" + } + ], + "title": "Gyroscope", + "widget": "gyro" + }, + { + "datasets": [ + { + "alarm": 40, + "fft": false, + "fftSamples": 1024, + "fftSamplingRate": 100, + "graph": false, + "index": 7, + "led": false, + "ledHigh": 1, + "log": false, + "max": 100, + "min": 0, + "title": "Temperature", + "units": "℃", + "value": "", + "widget": "bar" + } + ], + "title": "Temperature", + "widget": "" + } + ], + "mapTilerApiKey": "", + "separator": ",", + "thunderforestApiKey": "", + "title": "MPU6050" +} From eb0e4482218257722435d4a03cfd02b602a30eae Mon Sep 17 00:00:00 2001 From: Alex Spataru Date: Thu, 7 Nov 2024 02:03:00 -0500 Subject: [PATCH 2/2] Update MPU6050.json --- examples/MPU6050/MPU6050.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/MPU6050/MPU6050.json b/examples/MPU6050/MPU6050.json index 11b6e657..88928960 100644 --- a/examples/MPU6050/MPU6050.json +++ b/examples/MPU6050/MPU6050.json @@ -3,9 +3,9 @@ ], "decoder": 0, "frameDetection": 1, - "frameEnd": "*/", + "frameEnd": ";", "frameParser": "/**\n * This function splits a data frame using the project-specified separator,\n * allowing you to customize frame parsing for different project requirements.\n *\n * Global variables can maintain a constant output array, enabling a single\n * Serial Studio project to display information consistently, even with varying\n * frame types.\n *\n * @param[in] frame The latest received frame as a string.\n * @param[in] separator The data separator defined in the JSON project.\n * @return Array of strings containing the parsed frame elements.\n *\n * @note Only data within the delimiters is processed.\n * @note Declare global variables outside @c parse() for state/configuration.\n *\n * @example\n * Given frame: \"value1,value2,value3\", separator: \",\"\n * Returns: [\"value1\", \"value2\", \"value3\"]\n */\nfunction parse(frame, separator) {\n return frame.split(separator);\n}\n", - "frameStart": "/*", + "frameStart": "$", "groups": [ { "datasets": [