{"_id":"4dlcd","_rev":"13-40cb1a38adb529268806ecda32ea481b","name":"4dlcd","description":"An implementation of the 4D SGC/Picasso development environment","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"4dlcd","version":"0.1.0","description":"An implementation of the 4D SGC/Picasso development environment","main":"device.js","scripts":{"test":"vows --spec"},"devDependencies":{"vows":"~0.6.3"},"author":{"name":"Jerry Sievert","email":"code@legitimatesounding.com","url":"http://legitimatesounding.com/blog/index.html"},"license":"BSD","_id":"4dlcd@0.1.0","dist":{"shasum":"c722001853a466c28d0e80e397718c5daf657bf5","tarball":"https://registry.npmjs.org/4dlcd/-/4dlcd-0.1.0.tgz","integrity":"sha512-bdSusQvAoFXwKoSQ/ts7ozdstRFNzkXib7fVxY9vQhGyIo7R5gGhCsddqAqExnsAMOAztJUNjgm8I8LthR+MwA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCUxm94t4D7YArUkOeet9uSNHRRl0L3D3/AXBwjnkeTcAIhAO40WfAxrPiF415E0oNkXkYcXvTGU/i+VyHBu2RrP8HO"}]},"maintainers":[{"name":"JerrySievert","email":"code@legitimatesounding.com"}],"directories":{}},"0.1.1":{"name":"4dlcd","version":"0.1.1","description":"An implementation of the 4D SGC/Picasso development environment","main":"device.js","scripts":{"test":"vows --spec"},"devDependencies":{"vows":"~0.6.4"},"author":{"name":"Jerry Sievert","email":"code@legitimatesounding.com","url":"http://legitimatesounding.com/blog/index.html"},"license":"BSD","_id":"4dlcd@0.1.1","dist":{"shasum":"2b53332012f2dd5ab43fb536bd399db1e193f8ae","tarball":"https://registry.npmjs.org/4dlcd/-/4dlcd-0.1.1.tgz","integrity":"sha512-BETgEkVcAg5ISCIGBXuXCgXGEuq/Xz4R+6TASPGY5Oc/5tA1Gd8RLWk0tJaYc79U5FIR1W40KeWB4CVm/ZTRxg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBEaiillYL6/hhkNBTOdy58bw7pBWQdONsKWb0SYK+zDAiA4QtNj/IQlggHRB+ifJGMgkqhdAVkVaWKuosFI4n/wdw=="}]},"_npmVersion":"1.1.59","_npmUser":{"name":"JerrySievert","email":"code@legitimatesounding.com"},"maintainers":[{"name":"JerrySievert","email":"code@legitimatesounding.com"}]}},"readme":"# 4D SGC/Picasso LCD Controller for Node.js\n\nThis is an experimental library: an ever-growing implementation of the 4D Systems SGC/Picasso protocol.  See http://www.4dsystems.com.au/prod.php?id=113 and http://www.4dsystems.com.au/downloads/Semiconductors/PICASO-SGC/Docs/PICASO-SGC-COMMANDS-SIS-rev11.pdf\n\n## Installing\n\n    $ npm install 4dlcd\n\n## Using It\n\n    var 4dlcd = require('4dlcd').Device;\n    var SerialPort = require('serialport').SerialPort;\n    \n    var port = new SerialPort('/dev/ttyUSB1', { baudrate: 9600 });\n    var lcd = new 4dlcd(port);\n    \n    lcd.autobaud();\n    \n    // draw a red rectangle from 0,0 to 10,10\n    lcd.drawRectangle(0, 0, 10, 10, 255, 0, 0);\n\n## Documentation\n\nThis module serves as a buffered thin wrapper around the underlying protocol.  It handles `RGB` conversion as well as buffering commands in order to stop packet collisions.\n\nSince commands are queued, callbacks are optional.  If none is passed, a default callback will be used.  Code is still executed asynchronously, so multiple commands can be executed and the callback sent with the final command will be called when completed.\n\n### Constructor\n\nInstantiate a new instance of the display.  The parameter passed should be a connected `SerialPort`.\n\n#### Example\n\n    var port = new SerialPort('/dev/ttyUSB1', { baudrate: 9600 });\n    var lcd = new 4dlcd(port);\n\n### autobaud(/* optional callback */)\n\nAutobaud is the initialization command and must be called before any other command can be called.\n\n#### Example\n\n    lcd.autobaud(function (err, status) {\n      console.dir(status); // Buffer <0x06>\n    });\n\n### version(/* optional callback */)\n\nVersion returns a Buffer containing the version information of the connected device:\n\n* device_type\n** 0x01 = micro-LCD.\n** 0x02 = micro-VGA.\n* hardware_rev\n* firmware_rev\n* horizontal_res\n  * 0x28 : 128 pixels\n  * 0x32: 320 pixels\n  * 0x60 : 160 pixels\n  * 0x64 : 64 pixels\n  * 0x76 : 176 pixels\n  * 0x96 : 96 pixels\n  * 0xFF : Unknown\n* vertical_res\n  * 0x22 : 220 pixels\n  * 0x24 : 240 pixels\n  * 0x28 : 128 pixels\n  * 0x32 : 320 pixels\n  * 0x60 : 160 pixels\n  * 0x64 : 64 pixels\n  * 0x76 : 176 pixels\n  * 0x96 : 96 pixels\n  * 0xFF : Unknown\n\n### replaceBackgroundColour(r, g, b, /* optional callback */)\n\nChanges the background color of the screen immediately.\n\n#### Example\n\n    lcd.replaceBackgroundColour(255, 0, 0, function (err, status) {\n      console.dir(status); // Buffer <0x06>\n    });\n\n### clearScreen(/* optional callback */)\n\nClears the screen.\n\n#### Example\n\n    lcd.clearScreen(function (err, status) {\n      console.dir(status); // Buffer <0x06>\n    });\n\n### controlFunction(mode, value, /* optional callback */)\n\nSends a control function to the screen.\n\n### drawImage65k(x, y, width, height, data, /* optional callback */)\n\nDraws an image, specified in the data argument (16bit - 565 format) at the x and y coordinates specified.\n\n#### Example\n\n    lcd.drawImage65k(0, 0, 1, 2, new Buffer([ 0xff, 0xff, 0xff, 0xff ]));\n\n","maintainers":[{"name":"jerrysievert","email":"code@legitimatesounding.com"}],"time":{"modified":"2022-06-12T14:07:48.005Z","created":"2012-08-22T02:10:38.641Z","0.1.0":"2012-08-22T02:10:40.406Z","0.1.1":"2012-10-04T23:58:31.430Z"},"author":{"name":"Jerry Sievert","email":"code@legitimatesounding.com","url":"http://legitimatesounding.com/blog/index.html"},"license":"BSD","readmeFilename":""}