finson / lunijs Goto Github PK
View Code? Open in Web Editor NEWJavascript interface to Arduino Device Driver library LuniLib via Firmata.
Javascript interface to Arduino Device Driver library LuniLib via Firmata.
After a couple of weekends out of town I finally have time to continue testing DeviceFirmata. In attempting to run the DemoHelloAPI example, I see that init is called a second time after DeviceAPI.open is called. I don't see anything in the application flow that would trigger this, but it is what I'm observing. Same for DemoMetaAPI.
This is the error message I get (I added a console log just inside the init function):
soundanalogous:LuniJS soundanalogous$ node examples/DemoHelloAPI.js
[2016-07-09 13:42:15.095] [INFO] DemoHelloAPI - Program DemoHelloAPI is running.
init
[2016-07-09 13:42:15.103] [DEBUG] DemoHelloAPI - Board is ready.
[2016-07-09 13:42:15.104] [DEBUG] DemoHelloAPI - RemoteDeviceDriver is ready.
[2016-07-09 13:42:15.104] [DEBUG] DemoHelloAPI - HelloAPI is created.
[2016-07-09 13:42:15.104] [DEBUG] DemoHelloAPI - Sequencer is created.
[2016-07-09 13:42:15.104] [INFO] DemoHelloAPI - Begin step processing.
[2016-07-09 13:42:15.104] [TRACE] DeviceAPI - open(Hello:0)
init
[2016-07-09 13:42:15.106] [DEBUG] DemoHelloAPI - Board is ready.
/Users/soundanalogous/Documents/Dev/LuniJS/node_modules/firmata/lib/firmata.js:1859
throw new Error(commandByte + " is not an available SYSEX_RESPONSE byte");
^
Error: 95 is not an available SYSEX_RESPONSE byte
at Board.sysexResponse (/Users/soundanalogous/Documents/Dev/LuniJS/node_modules/firmata/lib/firmata.js:1859:11)
at RemoteDeviceDriver (/Users/soundanalogous/Documents/Dev/LuniJS/lib/RDD/RemoteDeviceDriver.js:45:16)
at firmata.Board (/Users/soundanalogous/Documents/Dev/LuniJS/examples/DemoHelloAPI.js:44:16)
at Board.<anonymous> (/Users/soundanalogous/Documents/Dev/LuniJS/node_modules/firmata/lib/firmata.js:545:7)
at emitOne (events.js:96:13)
at SerialPort.emit (events.js:188:7)
at SerialPort._error (/Users/soundanalogous/Documents/Dev/LuniJS/node_modules/serialport/lib/serialport.js:188:10)
at SerialPort.write (/Users/soundanalogous/Documents/Dev/LuniJS/node_modules/serialport/lib/serialport.js:259:17)
at Board.sysexCommand (/Users/soundanalogous/Documents/Dev/LuniJS/node_modules/firmata/lib/firmata.js:1890:18)
at RemoteDeviceDriver.open (/Users/soundanalogous/Documents/Dev/LuniJS/lib/RDD/RemoteDeviceDriver.js:128:16)
The SYSEX_RESPONSE error is due to the second call to init, where the first call already populated the 0x5F command id.
Conversions from js (utf-16) to Arduino (utf-8) and back to utf-16 need a thorough review. The distinctions between bytes and characters and between byte length and string length are not consistently observed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.