After playing with it I did figure out why it did not work when I linked to 
it through the USB.  I linked through it with the :3000 in the which is the 
link that I get from Cloud9 when I preview the page.   The link was:

192.168.7.2:3000/preview/thermostat.html

I didn't know that the default/root directory for web pages was 
/var/lib/cloud9  , I had thought it was the root directory /root and I also 
didn't think it mattered where the HTML file was located or how it was 
linked to through the browser, I thought it would work from any directory 
through any route.    Once I linked to the HTML through a direct route 
without the :3000 it worked fine.   

So when you point to the link given in Cloud9 the HTML/JS program won't 
work and I think this is why the Cloud9 preview doesn't actually run the 
javascript when you preview the file you create and edit.  

So once I linked directly as such 
USB
192.168.7.2/thermostat.html     

or
Ethernet
130.140.37.188/thermostat.html

Everything did work in both cases.  

Some things do work through the preview link in cloud9 and others do not.

Thanks Jason and everyone else for all the help.    


John


On Tuesday, November 18, 2014 10:09:51 AM UTC-8, Jason Kridner wrote:
>
> On Tue, Nov 18, 2014 at 10:04 AM, John Mladenik <[email protected] 
> <javascript:>> wrote: 
> > Bottom line was that the socket IO functions did not quite work right 
> when 
> > the BBB was only connected through the USB.  Once I connected through an 
> > Ethernet connection it all started to work. 
>
> They work just fine over USB. The problem is you aren't documenting 
> enough of your steps for us to tell you where you are going wrong. 
>
> > 
> > 
> > On Saturday, November 15, 2014 10:27:53 PM UTC-8, John Mladenik wrote: 
> >> 
> >> I have tried at least 6 different tutorials to turn an LED on and off 
> >> through a web page.   None of them work and all get one error or 
> another. 
> >> 
> >> The most common one is right after the line 
> >> var socket = io.connect(); 
> >>  Uncaught ReferenceError: io is not defined. 
> >> 
> >> I followed the instruction to install socket.io 2 or 3 times and think 
> >> this worked successfully. 
> >> 
> >> I did have to change the src line with socket.io.js in it to stop that 
> >> from getting an error and I changed it to 
> >> 
> >> <script 
> >> src="
> 192.168.7.2:3000/preview/node_modules/socket.io/node_modules/socket.io-client/socket.io.js">
>  
>
> >> </script> 
> >> 
> >> I have a new Rev C Beaglebone Black running Debian.  Any suggestion or 
> any 
> >> link or example I can try that can do something as simple as control a 
> GPIO 
> >> from a web page? 
> > 
> > -- 
> > For more options, visit http://beagleboard.org/discuss 
> > --- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "BeagleBoard" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to [email protected] <javascript:>. 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to