How to use the code

From Lofaro Lab Wiki
Revision as of 12:58, 27 November 2014 by Eeide (Talk | contribs)

Jump to: navigation, search

Servo/Joystick

the client code needs to be one one computer and the server code needs to be on the other. it is also possible to run the two codes on one machine if you use the computers local network code

Screenshot from 2014-11-27 11.png

in the picture above I opened a terminal window and typed ifconfig as long as you are connected to a network you will see what is shown above that is from a Virtual machine if you are using a full install it might show another part other than eth0 it might show up with a wlan or something like that.

the point is that these codes will need the inet addr: in this example it would be 172.16.42.8

if you want to run them both on one machine you can use the one in the lo part in this case it would be 127.0.0.1.

Screenshot from 2014-11-27 112.png

the file above is from the servo client code you need to do the ifconfig as above on both computers to find their ip addresses and you will need to put them in these locations in client. you will need to do this in all 3 of these files the server codes will only need their own ip addresses