Lesson 5: Radio

This code has two main functions indicated, one is when the square button is pressed, and the other is when the circle is pressed. So when we press square what it does is turn on the radio, and when we press circle we stop the radio.

JSON code:

{	"do": [		{			"on": {				"do": [					{						"radio": {							"play": 1,							"url": "http://icestreaming.rai.it/1.mp3"						}					}				],				"event": "touchSquare"			}		},		{			"on": {				"do": [					{						"radio": {							"play": 0						}					}				],				"event": "touchCircle"			}		}	]}