OK, I was wrong. It took 2 minutes :)
Here is the code:-
app.LoadPlugin( "PuckJS" ); function OnStart() { lay = app.CreateLayout( "Linear", "VCenter,FillXY" ); txt = app.CreateText( "Press your puck" ); lay.AddChild( txt ); app.AddLayout( lay ); puck = app.CreatePuckJS(); puck.SetOnConnect( OnConnect ); puck.SetOnButton( OnButton ); puck.Scan( "Puck" ); } function OnConnect() { puck.WatchButton( true ); } function OnButton( state ) { app.Call( "01359555555" ); }
@Dave_Smart started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
OK, I was wrong. It took 2 minutes :)
Here is the code:-