(not so much the technical parts of the language)
ART + JS
var serialport = require('node-serialport') | |
var sp = new serialport.SerialPort("/dev/ttyO3", { | |
parser: serialport.parsers.raw, | |
baud: 9600 | |
}) | |
sp.on('data', function(chunk) { | |
console.log(chunk.toString('hex'), chunk.toString(), chunk) | |
}) |
See this example live
You can select how many molecules to use and what the temperature should be.
/* vim:set ts=2 sw=2 sts=2 expandtab */ | |
/*jshint asi: true undef: true es5: true node: true devel: true | |
forin: false latedef: false */ | |
/*global define: true */ | |
if (typeof(WeakMap) === 'undefined') WeakMap = (function(global) { | |
"use strict"; | |
function defineNamespace(object, namespace) { |
### | |
Module dependencies | |
### | |
require.paths.unshift "#{__dirname}/lib/support/express-csrf/" | |
require.paths.unshift "#{__dirname}/lib/support/node_hash/lib/" | |
express = require 'express' | |
app = module.exports = express.createServer() | |
RedisStore = require 'connect-redis' |