Skip to content

Instantly share code, notes, and snippets.

@infosmick
Created December 29, 2016 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save infosmick/7e4682ece34d9341c459030593729272 to your computer and use it in GitHub Desktop.
Save infosmick/7e4682ece34d9341c459030593729272 to your computer and use it in GitHub Desktop.
Smick_04_analogic_output

Analogic output (PWM) example

[
{
"id": "8687af10.572f9",
"type": "tab",
"label": "analogic_output"
},
{
"id": "490bf569.5df81c",
"type": "ui_slider",
"z": "8687af10.572f9",
"name": "",
"label": "D2 PWM",
"group": "9afd09b1.9a0ca8",
"order": 2,
"width": 0,
"height": 0,
"passthru": true,
"topic": "",
"min": "0",
"max": "100",
"step": "1",
"x": 220,
"y": 340,
"wires": [
[
"39c62157.e0b85e"
]
]
},
{
"id": "2b8ff9bd.7a7ec6",
"type": "link out",
"z": "8687af10.572f9",
"name": "command",
"links": [
"1096456f.bfc93b"
],
"x": 775,
"y": 340,
"wires": []
},
{
"id": "b2d27b1b.4fa508",
"type": "function",
"z": "8687af10.572f9",
"name": "D2=n",
"func": "msg.payload=\"d2=\"+msg.payload;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 650,
"y": 340,
"wires": [
[
"2b8ff9bd.7a7ec6"
]
]
},
{
"id": "39c62157.e0b85e",
"type": "range",
"z": "8687af10.572f9",
"minin": "0",
"maxin": "100",
"minout": "0",
"maxout": "1023",
"action": "scale",
"round": true,
"name": "0..1023",
"x": 420,
"y": 340,
"wires": [
[
"b2d27b1b.4fa508"
]
]
},
{
"id": "d0a2ad0b.1ec3b",
"type": "comment",
"z": "8687af10.572f9",
"name": "analogic output (PWM)",
"info": "",
"x": 260,
"y": 240,
"wires": []
},
{
"id": "8e3013c5.d98f3",
"type": "comment",
"z": "8687af10.572f9",
"name": "Description",
"info": "Smick_04_analogic_output\n_______________________________________________________________________________\nPackage : Smick v.1\nModule : console\nAuthor : Curci\nLicence : (CC) BY-NC-SA\n\nThis work is licensed under a Creative Commons \nAttribution-NonCommercial-ShareAlike \n4.0 International License.\n\nHistory\n\nDate Author Description\n2016.12.17 Curci genesis\n_______________________________________________________________________________\n\nDescription\n\nQuesto flusso costruisce un cruscotto contenente un nodo slider per regolare la luminosità del LED.\nI comandi generati sono inviati a smick tramite il flusso \"dasboard console\".\n\nThis flow builds a dashboard that contains a slider node to regulate the LED brightness.\nThe generated commands are sent to Smick through \"dasboard console\" flow\".\n_______________________________________________________________________________\n\nBill Of Material\n\nHardware:\n\n 1 Human internet terminal (PC, tablet or smartphone) connected to the internet\n 1 Smick Wi-Fi connected to the internet\n 1 LED connected to smick \n\nHW Connections:\n\n Device pin Smick pin\n LED + D2\n LED - GND\n\nFlow Connections:\n\n console\n\nAccount:\n\n Wi-Fi credentials\n MQTT broker\n FRED\n",
"x": 220,
"y": 140,
"wires": []
},
{
"id": "9afd09b1.9a0ca8",
"type": "ui_group",
"z": "",
"name": "analogic",
"tab": "f142a68c.ec9b78",
"order": 2,
"disp": true,
"width": "6"
},
{
"id": "f142a68c.ec9b78",
"type": "ui_tab",
"z": "",
"name": "Output",
"icon": "dashboard",
"order": 2
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment