Skip to content

Instantly share code, notes, and snippets.

@nichnet
Created January 13, 2021 04:32
Show Gist options
  • Save nichnet/89b17806d5b35f2e07af18545d9f870c to your computer and use it in GitHub Desktop.
Save nichnet/89b17806d5b35f2e07af18545d9f870c to your computer and use it in GitHub Desktop.
// You can interface ic24lcd into node.js by using "child_process"
// https://github.com/nichnet/i2c4lcd
const process = require("child_process").spawn;
writeToDisplay("Hello World!");
function writeToDisplay(msg) {
var pathToFile = 'i2c4lcd.py'; //path to the python file.
var cmd = process('python', [
path,
"-m", msg,
//additional arguments for i2c4lcd that you may wan to set...
"-a", "c", // center align
"-c", // clear display
"-f" // flash the display
// etc...
]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment