diff --git a/_sources/lib/IRSensor.rst.txt b/_sources/lib/IRSensor.rst.txt index 72e60f9..26332b9 100644 --- a/_sources/lib/IRSensor.rst.txt +++ b/_sources/lib/IRSensor.rst.txt @@ -4,4 +4,19 @@ Infrared Sensor **************** .. autoclass:: compLib.IRSensor.IRSensor - :members: \ No newline at end of file + :members: + +Examples +========= + +Testing analog sensors +------------------------- + +.. code-block:: python + + from compLib import IRSensor + + ir = IRSensor.IRSensor() + + while True: + print ("left: {} middle: {} right: {}".format(ir.bottom_left_analog(), ir.bottom_middle_analog(), ir.bottom_right_analog())) \ No newline at end of file diff --git a/_static/pygments.css b/_static/pygments.css index 631bc92..13b7243 100644 --- a/_static/pygments.css +++ b/_static/pygments.css @@ -1,5 +1,10 @@ +pre { line-height: 125%; } +td.linenos pre { color: #000000; background-color: #f0f0f0; padding-left: 5px; padding-right: 5px; } +span.linenos { color: #000000; background-color: #f0f0f0; padding-left: 5px; padding-right: 5px; } +td.linenos pre.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .highlight .hll { background-color: #ffffcc } -.highlight { background: #f8f8f8; } +.highlight { background: #f8f8f8; } .highlight .c { color: #408080; font-style: italic } /* Comment */ .highlight .err { border: 1px solid #FF0000 } /* Error */ .highlight .k { color: #008000; font-weight: bold } /* Keyword */ diff --git a/genindex.html b/genindex.html index 0e68a6a..c91cea5 100644 --- a/genindex.html +++ b/genindex.html @@ -3,9 +3,9 @@
- + - +from compLib.Api import DoubleElim
position, status = DoubleElim.get_position()
-print(f"Position of my robot is: x={position.x}, y={position.y} and rotation is: {position.degrees}, the server responded with status code: {status}")
+print(f"Position of my robot is: x={position.x}, y={position.y} and rotation is: {position.degrees}, the server responded with status code: {status}")
goal, status = DoubleElim.get_goal()
-print(f"Goal is at: x={goal.x}, y={goal.y}, the server responded with status code: {status}")
+print(f"Goal is at: x={goal.x}, y={goal.y}, the server responded with status code: {status}")
import cv2
from compLib import Vision
-while True:
+while True:
# get newest opencv frame from camera
frame = Vision.Streaming.get_frame()
@@ -251,7 +211,7 @@ point your raspberry pi camera to a chessboard and it should be detected.
import cv2
from compLib import Vision
-while True:
+while True:
# get newest opencv frame from camera
frame = Vision.Streaming.get_frame()
@@ -261,7 +221,7 @@ point your raspberry pi camera to a chessboard and it should be detected.
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
# find the chessboard corners
- ret, corners = cv2.findChessboardCorners(gray, (6, 9), None)
+ ret, corners = cv2.findChessboardCorners(gray, (6, 9), None)
# draw detected chessboard position onto the image
cv2.drawChessboardCorners(frame, (6, 9), corners, ret)
@@ -284,28 +244,35 @@ point your raspberry pi camera to a chessboard and it should be detected.
+