Skip to content

Error: Invalid response from Ambient module #54

@snollygolly

Description

@snollygolly

I'm following the example on http://tessel.github.io/t2-start/modules/ambient.html but I can't get my module to work. This is what I get:

INFO Looking for your Tessel...
INFO Connected to Charmander.
INFO Building project.
INFO Writing project to RAM on Charmander (42.496 kB)...
INFO Deployed.
INFO Running index.js...
/tmp/remote-script/index.js:1
(function (exports, require, module, __filename, __dirname) { var t=require("tessel"),n=require("ambient-attx4"),e=n.use(t.port.A);e.on("ready",function(){setInterval(function(){e.getLightLevel(function(t,n){if(t)throw t;e.getSoundLevel(function(e,t){if(e)throw e;console.log("Light level:",n.toFixed(8)," ","Sound Level:",t.toFixed(8))})})},500)}),e.on("error",function(e){console.log(e)});
                                                                                                                                                                                                                                                                ^

Error: Invalid response from Ambient module
    at Error (native)
    at null.<anonymous> (/tmp/remote-script/node_modules/ambient-attx4/index.js:1:2516)
    at null.<anonymous> (/usr/lib/node/tessel-export.js:296:31)
    at emitNone (events.js:67:13)
    at Socket.emit (events.js:166:7)
    at emitReadable_ (_stream_readable.js:411:10)
    at emitReadable (_stream_readable.js:405:7)
    at readableAddChunk (_stream_readable.js:157:11)
    at Socket.Readable.push (_stream_readable.js:110:10)
    at Pipe.onread (net.js:523:20)

I also tried running the ambient triggers example, and it doesn't crash like this one, but it doesn't seem to register sound or light.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions