Add some scripting examples

This commit is contained in:
Collin Kidder
2017-12-10 11:15:58 -05:00
parent a31d56ce2f
commit 9859c586bd
4 changed files with 103 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
function setup ()
{
host.log("Example script 1.0");
host.setTickInterval(20000);
can.sendFrame(0, 0x7E0, 8, [0x0d, 1, 0, 0, 0, 0, 0, 0]);
can.setFilter(0x100, 0x700, 0);
}
function gotCANFrame (bus, id, len, data)
{
host.log("Bus: " + bus + " id: " + id.toString(16));
}
function tick()
{
host.log("TICK!");
}