diff --git a/config/sitemap.json b/config/sitemap.json index 6a43194e3b..0c1c9fb369 100644 --- a/config/sitemap.json +++ b/config/sitemap.json @@ -9917,6 +9917,10 @@ "tools/developer-tools/module-version.md": { "hash": "b6061154a3413973f4e1451c2bf16b5215017fcc431c640507218b64701ec50b", "date": "2025-11-04" + }, + "reference/application-notes.md": { + "hash": "ed124065eafd7ded63a4850f62225c8f65db07622e11b6e91e86506a19af19f8", + "date": "2025-11-06" } } } \ No newline at end of file diff --git a/scripts/nav_menu_generator.js b/scripts/nav_menu_generator.js index 4009f542d3..7449a6db62 100644 --- a/scripts/nav_menu_generator.js +++ b/scripts/nav_menu_generator.js @@ -85,22 +85,52 @@ function generateNavMenu(files, fileName, contentDir) { if (tileItem) { let html = ''; - html += '
\n'; - - for(const tile of tileItem.tiles) { - html += '
\n'; - html += ' \n'; - html += '
\n'; - html += '
\n'; - html += '
' + tile.title + '
\n'; - html += '
' + tile.detail + '
\n'; - html += '
\n'; - html += '
\n'; - html += '
\n'; - html += '
\n'; + + if (typeof tileItem.tileFormat === 'string' && tileItem.tileFormat == 'application-notes') { + // Application note style, with picture + html += '
\n'; + + for(const tile of tileItem.tiles) { + + html += ' \n'; + + } + + html += '
\n'; + } + else { + // Normal style + html += '
\n'; + for(const tile of tileItem.tiles) { + html += ' \n'; + } + + html += '
\n'; } - html += '
\n'; fileObj.tiles = html; } diff --git a/scripts/update-app-notes/app.js b/scripts/update-app-notes/app.js new file mode 100644 index 0000000000..202822e9a2 --- /dev/null +++ b/scripts/update-app-notes/app.js @@ -0,0 +1,104 @@ +// This tool updates docs.particle.io to import the marketing website application notes from +// https://www.particle.io/application-notes/ +// +// The images are downloaded to xxx +// The heading, short description, and link are saved in src/content/reference/newMenu.json +// to populate the tiles on the page: /reference/application-notes/ +// +// This is a separate tool from the standard docs build because it does not need to be run +// frequently, and also because it requires node.js v20 because of dependencies of cheerio. +// +// To use: +// nvm use 20 +// npm install +// node app.js + +const fs = require('fs'); +const path = require('path'); + +const cheerio = require("cheerio"); +const fetch = require("node-fetch"); // node-fetch@2 required for CommonJS + +const imageDir = path.join(__dirname, '..', '..', 'src', 'assets', 'images', 'application-notes'); +const menuJsonPath = path.join(__dirname, '..', '..', 'src', 'content', 'reference', 'newMenu.json'); + +async function run() { + try { + let html; + + if (fs.existsSync('test.html')) { + html = fs.readFileSync('test.html', 'utf8'); + } + else { + const fetchRes = await fetch('https://www.particle.io/application-notes/'); + html = await fetchRes.text(); + } + + const $ = cheerio.load(html); + + const tileDataArray = []; + + for(const liElem of $('main').find('li')) { + + const tileData = { + href: $(liElem).find('a').attr('href'), + title: $(liElem).find('h3').text(), + text: $(liElem).find('p:first').text(), + img: $(liElem).find('picture').find('img').attr('data-src'), + }; + + + // TODO: possibly extract the image format from the fm=jpg part of the img path, but it + // is currently always jpg + tileData.imageFileName = tileData.title.replace(/[^A-Za-z0-9]/g, '').toLowerCase() + '.jpg'; + tileData.imageFilePath = path.join(imageDir, tileData.imageFileName); + + // console.log('tileData', tileData); + + if (!fs.existsSync( tileData.imageFilePath)) { + const fetchRes = await fetch(tileData.img); + const buf = await fetchRes.buffer(); + + fs.writeFileSync( tileData.imageFilePath, buf); + } + + tileDataArray.push(tileData); + } + + const menuJsonStr = fs.readFileSync(menuJsonPath, 'utf8'); + const menuJson = JSON.parse(menuJsonStr); + + const topItems = menuJson.items; + const applicationNotesDir = topItems.find(e => e.dir == 'application-notes'); + + applicationNotesDir.tiles = []; + for(const tileData of tileDataArray) { + const obj = { + title: tileData.title, + detail: tileData.text, + href: 'https://www.particle.io' + tileData.href, + img: '/assets/images/application-notes/' + tileData.imageFileName, + }; + + + applicationNotesDir.tiles.push(obj); + } + console.log('tiles', applicationNotesDir.tiles); + + + const newMenuJsonStr = JSON.stringify(menuJson, null, 4); + if (menuJsonStr != newMenuJsonStr) { + fs.writeFileSync(menuJsonPath, newMenuJsonStr); + console.log('newMenu.json updated'); + } + else { + console.log('newMenu.json unchanged'); + } + + } + catch(e) { + console.log('exception', e); + } +} + +run(); diff --git a/scripts/update-app-notes/package-lock.json b/scripts/update-app-notes/package-lock.json new file mode 100644 index 0000000000..a1a30fac13 --- /dev/null +++ b/scripts/update-app-notes/package-lock.json @@ -0,0 +1,358 @@ +{ + "name": "power-consumption", + "version": "0.0.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "power-consumption", + "version": "0.0.1", + "license": "MIT", + "dependencies": { + "cheerio": "^1.1.0", + "node-fetch": "^2.7.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", + "license": "ISC" + }, + "node_modules/cheerio": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.1.0.tgz", + "integrity": "sha512-+0hMx9eYhJvWbgpKV9hN7jg0JcwydpopZE4hgi+KvQtByZXPp04NiCWU0LzcAbP63abZckIHkTQaXVF52mX3xQ==", + "license": "MIT", + "dependencies": { + "cheerio-select": "^2.1.0", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.3", + "domutils": "^3.2.2", + "encoding-sniffer": "^0.2.0", + "htmlparser2": "^10.0.0", + "parse5": "^7.3.0", + "parse5-htmlparser2-tree-adapter": "^7.1.0", + "parse5-parser-stream": "^7.1.2", + "undici": "^7.10.0", + "whatwg-mimetype": "^4.0.0" + }, + "engines": { + "node": ">=18.17" + }, + "funding": { + "url": "https://github.com/cheeriojs/cheerio?sponsor=1" + } + }, + "node_modules/cheerio-select": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", + "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", + "license": "BSD-2-Clause", + "dependencies": { + "boolbase": "^1.0.0", + "css-select": "^5.1.0", + "css-what": "^6.1.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/css-select": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.2.2.tgz", + "integrity": "sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw==", + "license": "BSD-2-Clause", + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^6.1.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/css-what": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.2.2.tgz", + "integrity": "sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA==", + "license": "BSD-2-Clause", + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "license": "MIT", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "BSD-2-Clause" + }, + "node_modules/domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "license": "BSD-2-Clause", + "dependencies": { + "domelementtype": "^2.3.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domutils": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz", + "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==", + "license": "BSD-2-Clause", + "dependencies": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/encoding-sniffer": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/encoding-sniffer/-/encoding-sniffer-0.2.1.tgz", + "integrity": "sha512-5gvq20T6vfpekVtqrYQsSCFZ1wEg5+wW0/QaZMWkFr6BqD3NfKs0rLCx4rrVlSWJeZb5NBJgVLswK/w2MWU+Gw==", + "license": "MIT", + "dependencies": { + "iconv-lite": "^0.6.3", + "whatwg-encoding": "^3.1.1" + }, + "funding": { + "url": "https://github.com/fb55/encoding-sniffer?sponsor=1" + } + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/htmlparser2": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-10.0.0.tgz", + "integrity": "sha512-TwAZM+zE5Tq3lrEHvOlvwgj1XLWQCtaaibSN11Q+gGBAS7Y1uZSWwXXRe4iF6OXnaq1riyQAPFOBtYc77Mxq0g==", + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "MIT", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.2.1", + "entities": "^6.0.0" + } + }, + "node_modules/htmlparser2/node_modules/entities": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", + "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "license": "BSD-2-Clause", + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, + "node_modules/parse5": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz", + "integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==", + "license": "MIT", + "dependencies": { + "entities": "^6.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5-htmlparser2-tree-adapter": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.1.0.tgz", + "integrity": "sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==", + "license": "MIT", + "dependencies": { + "domhandler": "^5.0.3", + "parse5": "^7.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5-parser-stream": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5-parser-stream/-/parse5-parser-stream-7.1.2.tgz", + "integrity": "sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==", + "license": "MIT", + "dependencies": { + "parse5": "^7.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5/node_modules/entities": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", + "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "license": "MIT" + }, + "node_modules/undici": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.16.0.tgz", + "integrity": "sha512-QEg3HPMll0o3t2ourKwOeUAZ159Kn9mx5pnzHRQO8+Wixmh88YdZRiIwat0iNzNNXn0yoEtXJqFpyW7eM8BV7g==", + "license": "MIT", + "engines": { + "node": ">=20.18.1" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-encoding": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", + "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", + "license": "MIT", + "dependencies": { + "iconv-lite": "0.6.3" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/whatwg-mimetype": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", + "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + } + } +} diff --git a/scripts/update-app-notes/package.json b/scripts/update-app-notes/package.json new file mode 100644 index 0000000000..ee83be4eae --- /dev/null +++ b/scripts/update-app-notes/package.json @@ -0,0 +1,16 @@ +{ + "name": "power-consumption", + "version": "0.0.1", + "description": "tool to parse power consumption reference manual", + "private": true, + "scripts": {}, + "contributors": [], + "license": "MIT", + "engines": { + "node": ">=20" + }, + "dependencies": { + "cheerio": "^1.1.0", + "node-fetch": "^2.7.0" + } +} diff --git a/src/assets/images/application-notes/aisystemcontrollerwithmhatandparticleledger.jpg b/src/assets/images/application-notes/aisystemcontrollerwithmhatandparticleledger.jpg new file mode 100644 index 0000000000..994b4d57a4 Binary files /dev/null and b/src/assets/images/application-notes/aisystemcontrollerwithmhatandparticleledger.jpg differ diff --git a/src/assets/images/application-notes/buildingaregressionmodel.jpg b/src/assets/images/application-notes/buildingaregressionmodel.jpg new file mode 100644 index 0000000000..ef5f47dcec Binary files /dev/null and b/src/assets/images/application-notes/buildingaregressionmodel.jpg differ diff --git a/src/assets/images/application-notes/cellularmodemforlinuxdevices.jpg b/src/assets/images/application-notes/cellularmodemforlinuxdevices.jpg new file mode 100644 index 0000000000..4863626f81 Binary files /dev/null and b/src/assets/images/application-notes/cellularmodemforlinuxdevices.jpg differ diff --git a/src/assets/images/application-notes/creatinganinventorymanagementsystem.jpg b/src/assets/images/application-notes/creatinganinventorymanagementsystem.jpg new file mode 100644 index 0000000000..04b85918a6 Binary files /dev/null and b/src/assets/images/application-notes/creatinganinventorymanagementsystem.jpg differ diff --git a/src/assets/images/application-notes/hostingapublicwebpagewithtachyon.jpg b/src/assets/images/application-notes/hostingapublicwebpagewithtachyon.jpg new file mode 100644 index 0000000000..c3c0b65671 Binary files /dev/null and b/src/assets/images/application-notes/hostingapublicwebpagewithtachyon.jpg differ diff --git a/src/assets/images/application-notes/identifyingbirdswithanlteenabledsmartfeeder.jpg b/src/assets/images/application-notes/identifyingbirdswithanlteenabledsmartfeeder.jpg new file mode 100644 index 0000000000..af559da414 Binary files /dev/null and b/src/assets/images/application-notes/identifyingbirdswithanlteenabledsmartfeeder.jpg differ diff --git a/src/assets/images/application-notes/locatingadevicewithoutgps.jpg b/src/assets/images/application-notes/locatingadevicewithoutgps.jpg new file mode 100644 index 0000000000..98978f2d24 Binary files /dev/null and b/src/assets/images/application-notes/locatingadevicewithoutgps.jpg differ diff --git a/src/assets/images/application-notes/loggingdatawithledger.jpg b/src/assets/images/application-notes/loggingdatawithledger.jpg new file mode 100644 index 0000000000..9dd9cff752 Binary files /dev/null and b/src/assets/images/application-notes/loggingdatawithledger.jpg differ diff --git a/src/assets/images/application-notes/particleforlinuxwiththemagicmirrorproject.jpg b/src/assets/images/application-notes/particleforlinuxwiththemagicmirrorproject.jpg new file mode 100644 index 0000000000..70cdad3541 Binary files /dev/null and b/src/assets/images/application-notes/particleforlinuxwiththemagicmirrorproject.jpg differ diff --git a/src/assets/images/application-notes/poweroptimizationstrategiesforgeneration4devices.jpg b/src/assets/images/application-notes/poweroptimizationstrategiesforgeneration4devices.jpg new file mode 100644 index 0000000000..f89948530f Binary files /dev/null and b/src/assets/images/application-notes/poweroptimizationstrategiesforgeneration4devices.jpg differ diff --git a/src/assets/images/application-notes/proximitygesturedetectionwithparticlesb504eandedgeimpulse.jpg b/src/assets/images/application-notes/proximitygesturedetectionwithparticlesb504eandedgeimpulse.jpg new file mode 100644 index 0000000000..14d44109e1 Binary files /dev/null and b/src/assets/images/application-notes/proximitygesturedetectionwithparticlesb504eandedgeimpulse.jpg differ diff --git a/src/assets/images/application-notes/reprogrammingaraspberrypiwithassetotaandab504e.jpg b/src/assets/images/application-notes/reprogrammingaraspberrypiwithassetotaandab504e.jpg new file mode 100644 index 0000000000..f35797b27b Binary files /dev/null and b/src/assets/images/application-notes/reprogrammingaraspberrypiwithassetotaandab504e.jpg differ diff --git a/src/assets/images/application-notes/timeofflightflappybirdwithtachyon.jpg b/src/assets/images/application-notes/timeofflightflappybirdwithtachyon.jpg new file mode 100644 index 0000000000..c9ebf050dc Binary files /dev/null and b/src/assets/images/application-notes/timeofflightflappybirdwithtachyon.jpg differ diff --git a/src/assets/images/application-notes/trainingdataacquisitionoverlte.jpg b/src/assets/images/application-notes/trainingdataacquisitionoverlte.jpg new file mode 100644 index 0000000000..82f40e6bdc Binary files /dev/null and b/src/assets/images/application-notes/trainingdataacquisitionoverlte.jpg differ diff --git a/src/assets/images/application-notes/videostreamingandstorageontachyon.jpg b/src/assets/images/application-notes/videostreamingandstorageontachyon.jpg new file mode 100644 index 0000000000..f039e02c0e Binary files /dev/null and b/src/assets/images/application-notes/videostreamingandstorageontachyon.jpg differ diff --git a/src/assets/images/application-notes/weatherdashboardwithlvglcloudsecretsandledger.jpg b/src/assets/images/application-notes/weatherdashboardwithlvglcloudsecretsandledger.jpg new file mode 100644 index 0000000000..3a9af16211 Binary files /dev/null and b/src/assets/images/application-notes/weatherdashboardwithlvglcloudsecretsandledger.jpg differ diff --git a/src/assets/less/main.less b/src/assets/less/main.less index d25ff551ef..05f85c47be 100644 --- a/src/assets/less/main.less +++ b/src/assets/less/main.less @@ -28,7 +28,7 @@ div.mainGridHome { margin-top: 20px; } - div.mainSquare { +div.mainSquare { float:left; position: relative; width: 274px; @@ -136,3 +136,19 @@ a.mainGridButton { color: var(--theme-main-grid-button-color); } +// Application notes + +img.applicationNoteGridImg { // Based on mainGridImg + object-fit: contain; + max-width: 230px !important; + max-height: 180px !important; +} + +div.applicationNoteTop { // Based on mainTop + width: 250px; + height: 200px; + display: flex; + align-items: center; + margin: 12px 12px 0px 12px; +} + diff --git a/src/content/reference/application-notes.md b/src/content/reference/application-notes.md new file mode 100644 index 0000000000..40d9323025 --- /dev/null +++ b/src/content/reference/application-notes.md @@ -0,0 +1,9 @@ +--- +title: Application notes +layout: commonTwo.hbs +columns: two +--- + +# {{title}} + +{{{tiles}}} \ No newline at end of file diff --git a/src/content/reference/newMenu.json b/src/content/reference/newMenu.json index 27115708c1..12c1912429 100644 --- a/src/content/reference/newMenu.json +++ b/src/content/reference/newMenu.json @@ -37,6 +37,109 @@ } ] }, + { + "dir": "application-notes", + "title": "Application notes", + "tileFormat": "application-notes", + "tiles": [ + { + "title": "Locating a device without GPS", + "detail": "Use a cell tower lookup to estimate the location of a device that routinely loses GPS fix.", + "href": "https://www.particle.io/application-notes/how-to-use-particles-enhanced-location-service-to-locate-a-device-without/", + "img": "/assets/images/application-notes/locatingadevicewithoutgps.jpg" + }, + { + "title": "Video streaming and storage on Tachyon", + "detail": "Configure an AWS Kinesis Video Stream for a webcam feed with YOLOv8 inferencing.", + "href": "https://www.particle.io/application-notes/video-streaming-and-storage-on-tachyon-using-aws-kinesis-video-streams/", + "img": "/assets/images/application-notes/videostreamingandstorageontachyon.jpg" + }, + { + "title": "Time of flight Flappy Bird with Tachyon", + "detail": "Run a Python port of Flappy Bird on the SBC with a ToF sensor for input.", + "href": "https://www.particle.io/application-notes/time-of-flight-flappy-bird-with-tachyon/", + "img": "/assets/images/application-notes/timeofflightflappybirdwithtachyon.jpg" + }, + { + "title": "Hosting a public webpage with Tachyon", + "detail": "Set up a Cloudflare tunnel into your SBC, which will serve a webpage to anyone who visits the URL.", + "href": "https://www.particle.io/application-notes/hosting-a-public-webpage-with-tachyon/", + "img": "/assets/images/application-notes/hostingapublicwebpagewithtachyon.jpg" + }, + { + "title": "Weather dashboard with LVGL, cloud secrets, and Ledger", + "detail": "Check the forecast at a glance on a portable, Particle-powered display. ", + "href": "https://www.particle.io/application-notes/particle-weather-dashboard-with-lvgl-cloud-secrets-and-ledger/", + "img": "/assets/images/application-notes/weatherdashboardwithlvglcloudsecretsandledger.jpg" + }, + { + "title": "Particle for Linux with the MagicMirror² project", + "detail": "Remotely manage your Raspberry Pi-powered smart mirror deployment.", + "href": "https://www.particle.io/application-notes/particle-for-linux-with-the-magic-mirror-project/", + "img": "/assets/images/application-notes/particleforlinuxwiththemagicmirrorproject.jpg" + }, + { + "title": "Proximity gesture detection with Particle’s B504e and Edge Impulse", + "detail": "Reliably classify hand gestures using proximity and light data.", + "href": "https://www.particle.io/application-notes/proximity-gesture-detection-with-particles-b504e-and-edge-impulse/", + "img": "/assets/images/application-notes/proximitygesturedetectionwithparticlesb504eandedgeimpulse.jpg" + }, + { + "title": "Power optimization strategies for Generation 4 Devices", + "detail": "Build robust applications using Particle's Gen 4 devices without compromising on energy efficiency.", + "href": "https://www.particle.io/application-notes/power-optimization-strategies-for-generation-4-devices/", + "img": "/assets/images/application-notes/poweroptimizationstrategiesforgeneration4devices.jpg" + }, + { + "title": "Training data acquisition over LTE", + "detail": "Use an LTE-enabled module to remotely gather training data for an AI model.", + "href": "https://www.particle.io/application-notes/edge-impulse-training-data-acquisition-over-lte-with-particle/", + "img": "/assets/images/application-notes/trainingdataacquisitionoverlte.jpg" + }, + { + "title": "AI system controller with M-HAT and Particle Ledger", + "detail": "Configure a system that you can operate with your voice.", + "href": "https://www.particle.io/application-notes/ai-system-controller-with-raspberry-pi-m-hat-and-particle-ledger/", + "img": "/assets/images/application-notes/aisystemcontrollerwithmhatandparticleledger.jpg" + }, + { + "title": "Creating an inventory management system", + "detail": "Keep track of stock levels using a Particle M-SoM with a custom carrier PCB.", + "href": "https://www.particle.io/application-notes/creating-an-inventory-management-system-with-particle/", + "img": "/assets/images/application-notes/creatinganinventorymanagementsystem.jpg" + }, + { + "title": "Identifying birds with an LTE-enabled smart feeder", + "detail": "Flockr can classify the species of bird from a video feed without Wi-Fi access.", + "href": "https://www.particle.io/application-notes/flockr-an-lte-enabled-smart-bird-feeder/", + "img": "/assets/images/application-notes/identifyingbirdswithanlteenabledsmartfeeder.jpg" + }, + { + "title": "Reprogramming a Raspberry Pi with Asset OTA and a B504e", + "detail": "Perform a remote software update on a Raspberry Pi over LTE.", + "href": "https://www.particle.io/application-notes/reprogramming-a-raspberry-pi-with-particles-asset-ota-and-a-b504e/", + "img": "/assets/images/application-notes/reprogrammingaraspberrypiwithassetotaandab504e.jpg" + }, + { + "title": "Logging data with Ledger", + "detail": "Gain remote access to detailed logging and device metadata for faster troubleshooting.", + "href": "https://www.particle.io/application-notes/reduce-on-site-support-costs-by-logging-data-with-particles-device-ledger/", + "img": "/assets/images/application-notes/loggingdatawithledger.jpg" + }, + { + "title": "Cellular modem for Linux devices", + "detail": "For remote deployments where Wi-Fi isn’t available.", + "href": "https://www.particle.io/application-notes/m-hat-more-than-just-a-cellular-modem-for-linux-devices/", + "img": "/assets/images/application-notes/cellularmodemforlinuxdevices.jpg" + }, + { + "title": "Building a regression model", + "detail": "Developed with Edge Impulse to compensate for a system’s drift.", + "href": "https://www.particle.io/application-notes/building-a-regression-model-for-non-linear-systems/", + "img": "/assets/images/application-notes/buildingaregressionmodel.jpg" + } + ] + }, { "dir": "device-os", "isSection": true,