Difference between revisions of "Minibot"

From Lofaro Lab Wiki
Jump to: navigation, search
 
(29 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
 
This is MiniBot it is the robot that we maid for out Senior design project.
 
This is MiniBot it is the robot that we maid for out Senior design project.
'''Networking'''
+
----
we used [https://docs.python.org/2/library/socket.html import socket] for sending information over a network with a client and a server
+
==Tutorials==
 +
* [[python library for dynamixel servos]]
 +
* [[Networking/import socket]]
 +
* [[haptic feedback ax-12a code]]
 +
* [[cad files for solidworks and stl type also ax-12a model and baxter]]
  
''server''
 
the code for the server is
 
  
-host = '192.168.0.102' #gets comp ip address
+
==Code==
 
+
* [[How to use the code]]
-port = 20000 #random port this can be set to almost anything between 1023 and 6000 ish once you start a server if you need to restart it you will need to close that terminal and open a new one so the port will no longer be in use
+
* [http://WDMyCloud.device1083053.wd2go.com/api/1.0/rest/dir_contents/Public/Lofaro%20labs/e/server?device_user_id=9466339&request_auth_code=fd228b2b4791d42dc2a2195409b171726732655f2a9d933048105025f03771b5 Server]
 
+
* [http://WDMyCloud.device1083053.wd2go.com/api/1.0/rest/dir_contents/Public/Lofaro%20labs/e/client?device_user_id=9466339&request_auth_code=4103245befd8acf07f6af168195e619a49ad1c8cf3f57d549fdad5498d77efe2 client]
-s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) this part is what tells the socket what kind of data we want to use AF_INET tells network/internet and sock_DGRAM tells it to use udp packets (these are somewhat unstable as they are not checked)
+
 
+
-s.bind((str(host), port)) #binds s to the server so it can be called
+
 
+
-data, addr = s.recvfrom(1024) this tells the program to wait till it gets a packet from the client the 1024 can be lowered but should be in base 2 if you leave it at 1024 it will be fine it just tells it to take data that is only 1024 or less
+

Latest revision as of 13:16, 27 November 2014

MiniBot.png

This is MiniBot it is the robot that we maid for out Senior design project.


Tutorials


Code