// touchKeyPadCalc2.js
// (c)20181004_aO
var kvs = "789CA456*/123+-00.==" // key values grid linear
, tkp = new (require("TouchKeyPad"))(
0,141,24,103,5,4,kvs) // grid area, cols, rows
, trd = new (require("TouchRD"))(B1,A5,A6,A7
,function(x,y,t) { if (!t.t) // on un-touch:
console.log(t.x,t.y,tkp.key(t.x,t.y),tkp.k,tkp.r,tkp.c); }
,require("TSRD26_142x104_cfg")
);
The actual calculator is still on the list (suggestions are welcome) as well as attaching any kind of display. Output of input shows in console so far (: - Touching 8 2 . 5 x 3 = produces this output (formatted and 'headed' posthume for legibility):
PS: Configured screen resolution is 142 W x 104 H spots (pixels), 0/0 is at left (x) top (y). Reasons for chosen resolution will be subject of another conversation.
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.
Here part of the code with input/output example:
The actual calculator is still on the list (suggestions are welcome) as well as attaching any kind of display. Output of input shows in console so far (: - Touching
8 2 . 5 x 3 =
produces this output (formatted and 'headed' posthume for legibility):PS: Configured screen resolution is 142 W x 104 H spots (pixels), 0/0 is at left (x) top (y). Reasons for chosen resolution will be subject of another conversation.
...more to come...