Welcome to CompLib’s documentation!¶
+Robo4you Competition Library¶
Indices and tables¶
--
-
- -
- -
- -
Table of Contents¶
+CompLib is the library used in the robo4you competition 2021.
+Contents¶
-
-
- Welcome to CompLib’s documentation! +
- Robo4you Competition Library +
- Usage
- Battery
- Class Documentation
- Examples
-
@@ -208,7 +203,7 @@
-
-
- Welcome to CompLib’s documentation! +
- Robo4you Competition Library +
- Usage
- Battery
- Buzzer
- Class Documentation diff --git a/lib/IRSensor.html b/lib/IRSensor.html index 20ef5c0..9a2a7c4 100644 --- a/lib/IRSensor.html +++ b/lib/IRSensor.html @@ -82,7 +82,8 @@
- Welcome to CompLib’s documentation! +
- Robo4you Competition Library +
- Usage
- Battery
- Buzzer
- Infrared Sensor diff --git a/lib/Motor.html b/lib/Motor.html index 7579c14..1183583 100644 --- a/lib/Motor.html +++ b/lib/Motor.html @@ -82,7 +82,8 @@
- Welcome to CompLib’s documentation! +
- Robo4you Competition Library +
- Usage
- Battery
- Buzzer
- Infrared Sensor diff --git a/lib/Servo.html b/lib/Servo.html index d3683a4..60e8e47 100644 --- a/lib/Servo.html +++ b/lib/Servo.html @@ -81,7 +81,8 @@
- Welcome to CompLib’s documentation! +
- Robo4you Competition Library +
- Usage
- Battery
- Buzzer
- Infrared Sensor diff --git a/objects.inv b/objects.inv index a746205..54792b6 100644 Binary files a/objects.inv and b/objects.inv differ diff --git a/other/usage.html b/other/usage.html new file mode 100644 index 0000000..084e21b --- /dev/null +++ b/other/usage.html @@ -0,0 +1,240 @@ + + + + + + + + + +
- Welcome to CompLib’s documentation! +
- Robo4you Competition Library +
- Usage
- Battery
- Buzzer
- Infrared Sensor diff --git a/searchindex.js b/searchindex.js index 806e349..8f0a245 100644 --- a/searchindex.js +++ b/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["index","lib/Battery","lib/Buzzer","lib/IRSensor","lib/Motor","lib/Servo"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,sphinx:56},filenames:["index.rst","lib/Battery.rst","lib/Buzzer.rst","lib/IRSensor.rst","lib/Motor.rst","lib/Servo.rst"],objects:{"compLib.Battery":{Battery:[1,0,1,""]},"compLib.Battery.Battery":{percent:[1,1,1,""]},"compLib.Buzzer":{Buzzer:[2,0,1,""]},"compLib.Buzzer.Buzzer":{set:[2,1,1,""]},"compLib.IRSensor":{IRSensor:[3,0,1,""]},"compLib.IRSensor.IRSensor":{bottom_left:[3,1,1,""],bottom_middle:[3,1,1,""],bottom_right:[3,1,1,""],top_left_percent:[3,1,1,""],top_right_percent:[3,1,1,""]},"compLib.Motor":{Motor:[4,0,1,""]},"compLib.Motor.Motor":{all_off:[4,1,1,""],power:[4,1,1,""]},"compLib.Servo":{Servo:[5,0,1,""]},"compLib.Servo.Servo":{set_position:[5,1,1,""],setup_position:[5,1,1,""]}},objnames:{"0":["py","class","Python class"],"1":["py","method","Python method"]},objtypes:{"0":"py:class","1":"py:method"},terms:{"100":[1,3,4],"class":[0,3,5],"import":[1,2,4],"int":[1,3,4,5],"return":[1,3],"static":[1,2,3,4,5],"true":[2,3],Used:[1,2],access:3,all:4,all_off:4,angl:5,batteri:0,between:[1,3,4,5],bool:[2,3],bottom:3,bottom_left:3,bottom_middl:3,bottom_right:3,buzzer:0,channel:5,complib:[1,2,3,4,5],connect:[4,5],control:[4,5],detect:3,differ:3,drive:0,dure:5,exampl:0,fals:2,from:[1,2,4],get:[1,3],index:0,infrar:0,interact:[1,2],irsensor:3,left:[3,4],max:4,mayb:0,middl:3,modul:0,motor:0,off:0,page:0,paramet:[2,4,5],percent:[1,4],percentag:[0,3,4],port:[4,5],posit:5,power:4,print:0,process:5,rang:4,right:[3,4],robot:[3,5],search:0,sensor:0,servo:0,set:[2,4,5],set_posit:5,setup:5,setup_posit:5,signal:3,sleep:2,specifi:4,speed:4,statu:3,straight:0,time:2,top:[3,4],top_left_perc:3,top_right_perc:3,turn:[0,4],type:[1,3],used:[4,5],which:4},titles:["Welcome to CompLib\u2019s documentation!","Battery","Buzzer","Infrared Sensor","Motor","Servo"],titleterms:{"class":[1,2,4],batteri:1,buzzer:2,complib:0,content:0,document:[0,1,2,4],drive:4,exampl:[1,2,4],indic:0,infrar:3,mayb:4,motor:4,off:2,percentag:1,print:1,sensor:3,servo:5,straight:4,tabl:0,turn:2,welcom:0}}) \ No newline at end of file +Search.setIndex({docnames:["index","lib/Battery","lib/Buzzer","lib/IRSensor","lib/Motor","lib/Servo","other/usage"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,sphinx:56},filenames:["index.rst","lib/Battery.rst","lib/Buzzer.rst","lib/IRSensor.rst","lib/Motor.rst","lib/Servo.rst","other/usage.rst"],objects:{"compLib.Battery":{Battery:[1,0,1,""]},"compLib.Battery.Battery":{percent:[1,1,1,""]},"compLib.Buzzer":{Buzzer:[2,0,1,""]},"compLib.Buzzer.Buzzer":{set:[2,1,1,""]},"compLib.IRSensor":{IRSensor:[3,0,1,""]},"compLib.IRSensor.IRSensor":{bottom_left:[3,1,1,""],bottom_middle:[3,1,1,""],bottom_right:[3,1,1,""],top_left_percent:[3,1,1,""],top_right_percent:[3,1,1,""]},"compLib.Motor":{Motor:[4,0,1,""]},"compLib.Motor.Motor":{all_off:[4,1,1,""],power:[4,1,1,""]},"compLib.Servo":{Servo:[5,0,1,""]},"compLib.Servo.Servo":{set_position:[5,1,1,""],setup_position:[5,1,1,""]}},objnames:{"0":["py","class","Python class"],"1":["py","method","Python method"]},objtypes:{"0":"py:class","1":"py:method"},terms:{"100":[1,3,4],"2021":0,"class":[0,3,5],"import":[1,2,4,6],"int":[1,3,4,5],"return":[1,3],"static":[1,2,3,4,5],"true":[2,3],Used:[1,2],__main__:6,__name__:6,access:3,all:4,all_off:4,angl:5,backward:6,batteri:0,beep:6,between:[1,3,4,5],bin:6,bool:[2,3],bottom:3,bottom_left:3,bottom_middl:3,bottom_right:3,buup:6,buzzer:0,channel:5,complib:[0,1,2,3,4,5,6],connect:[4,5],control:[4,5],def:6,detect:3,differ:3,document:0,drive:0,dure:5,ein:6,exampl:0,fals:2,forward:6,from:[1,2,4,6],get:[1,3],hallo:6,ich:6,infrar:0,interact:[1,2],irsensor:3,left:[3,4],main:6,max:4,mayb:0,middl:3,motor:[0,6],off:0,paramet:[2,4,5],percent:[1,4],percentag:[0,3,4],port:[4,5,6],posit:5,power:[4,6],print:[0,6],process:5,rang:[4,6],right:[3,4],robot:[3,5,6],sensor:0,servo:0,set:[2,4,5],set_posit:5,setup:5,setup_posit:5,signal:3,sleep:[2,6],specifi:4,speed:4,statu:3,straight:0,time:[2,6],top:[3,4],top_left_perc:3,top_right_perc:3,turn:[0,4],type:[1,3],usag:0,used:[0,4,5],which:4},titles:["Robo4you Competition Library","Battery","Buzzer","Infrared Sensor","Motor","Servo","Usage"],titleterms:{"class":[1,2,4],batteri:1,buzzer:2,competit:0,content:0,document:[1,2,4],drive:4,exampl:[1,2,4],infrar:3,librari:0,mayb:4,motor:4,off:2,percentag:1,print:1,robo4y:0,sensor:3,servo:5,straight:4,turn:2,usag:6}}) \ No newline at end of file
-
-
-
-
-
-
Usage — CompLib 0.0.1 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ++ + + ++ + + + + + + + + + + \ No newline at end of file diff --git a/search.html b/search.html index e0589b3..5488f8e 100644 --- a/search.html +++ b/search.html @@ -82,7 +82,8 @@+ + + + + + + ++ ++ ++ + + + + + + + + + + + + + + + + ++ +++ + ++ ++ +++ + +Usage¶
+++import time +from compLib.Motor import * + +def forward(): + for port in range(0, 3): + Motor.power(port, 30); + +def backward(): + for port in range(0, 3): + Motor.power(port, -30); + +def main(): + print("hallo ich bin ein roboter beep buup") + + forward() + time.sleep(1) + backward() + time.sleep(1) + +if __name__ == '__main__': + main() +
-
-