Intel® Makers
Intel® Edison, Intel® Joule™, Intel® Curie™, Intel® Galileo
Welcome - This is a Peer-to-Peer Forum only. Intel has discontinued these products but you may find support from other customers on this Forum
9881 Discussions

Unsuccessfully Loading .js Sources

New Contributor I

Using the Edison Arduino breakout with usb sound card set up as default. Working with Timbre.js and Cylon to get a button to trigger a .wav file. I am using and am able to connect to the socket and see that I am pushing the button.

But am having trouble loading the .js sources. I've tried moving the files around and changing the directory paths in my index.html file.

I am running app.js from my root, where my index.html and drumkit.wav is. My .js files are in a folder called js in my root. I am using Chrome.

My paths are written as such:

I go to my device page in Chrome and open the javascript console tool. It tells me that the server is saying that it's not found.



GET 404 (Not Found)

I've been trying things for hours, not sure what I am missing here.

Any ideas?

Thank you!

3 Replies

Hi postITnote,

Did you try erasing the js folder and putting the .js files directly in your root? Also, you can try changing the name of the folder that contains these files, instead of using js why don't you try with scripts or something similar.

You can also change the name of the source to src="home/root/scripts/playsounds.js" and so on, just to see if you get a different result.



New Contributor I

Thanks PabloM_Intel,

It turns out I was missing this line of code

app.use(express.static(__dirname + '/public'))

I am having great difficulty figuring out how to use socket messages outside of functions to alter webpages. For example I have a potentiometer hooked up and am getting values in the javascript console over the socket connection. I am trying to use those values to move a slider on my index.html page.

Here is the code snippet. I have now that is printing values to the console with the creation of the slider and it's attributes.

socket.on('analogSensor', function(analogVal){

console.log('sensor value', analogVal)


new Interface.Slider({

drag : function(value){

frequency.rampTo(value, 0.1);


start : function(){

Tone.Master.mute = false;


end: function(){

Tone.Master.mute = true;


name : "frequency",

min : 0,

max : 1,

exp : 0.5,

value : .5,

position: 5




I would like to take the analogVal and use it to change the frequency.rampTo value. I've been looking all over the web for days and can't find a way to get the analog values out from the socket.on function.