Closed compmonks closed 7 years ago
Your problem is here:
var express = require('express');
var app = express();
app.use(express.static('public'));
var openBCIBoard = require('openbci').OpenBCIBoard;
app.listen(myPort);
should be:
var express = require('express');
var app = express();
app.use(express.static('public'));
var OpenBCIBoard = require('openbci').OpenBCIBoard; // Note I made the variable caps
app.listen(myPort);
Please see the getStreaming.js example
thanks for your answer and pointing out the typo. Unfortunately, the issue remains. I will try to look again Thanks
Are you running it on a node server?
Yes
Please post a link to your source code.
here you go : https://github.com/compmonks/neurodesign
Oh wow that's confusing haha I'm not sure how to help you with it! Maybe check out @neurojs or @castillo-io can help you!
do you know any working example on a node server by any chance?
Did you check out @neurojs
Hi all, sorry for the noob question but I am currently banging my head trying to make openbci running. in my case I have the following node structure:
my app.js file loads openbci
my index.html file then loads a nav.js file where I try to get openbci streaming
<script src="/planetoftheapes/javascript/nav.js"></script>
the specific function in the js file looks like this
But it returns me an Uncaught ReferenceError: OpenBCIBoard is not defined which tells me that I cannot pass the openBCIBoard variable like this. Could you please tell me how to make it work?