At the beginning of this code, what we are going to do at the beginning is to create a variable called ‘a’, which contains the amount ‘500’, and we achieve this with the parameter ‘=‘, within the ‘set’. Later we have added a timer that every second adds 10 to the variable ‘a’ and makes a simple sound.
JSON code:
{ "do": [ { "set": [ "a", "=", 500 ] }, { "timer": { "do": [ { "set": [ "a", "+=", 10 ] }, { "sound": { "frequency": "a", "volume": 2 } } ], "every": 1, "id": 0, "play": 1 } } ]}Lesson 8: Webhook
This program’s basic function is that every minute, to our webhook, it will send a LED signal, with an indefinite time. We can achieve this with the timer and webhook function.JSON code: