File tree Expand file tree Collapse file tree 3 files changed +430
-0
lines changed
Expand file tree Collapse file tree 3 files changed +430
-0
lines changed Original file line number Diff line number Diff line change @@ -4,3 +4,4 @@ __pycache__
44dist
55* .egg-info
66RELEASE-VERSION
7+ build
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python
2+
3+ import logging
4+ from ev3dev .GyroBalancer import GyroBalancer
5+
6+
7+ class BALANC3R (GyroBalancer ):
8+ """
9+ Laurens Valk's BALANC3R
10+ http://robotsquare.com/2014/06/23/tutorial-building-balanc3r/
11+ """
12+ def __init__ (self ):
13+ GyroBalancer .__init__ (self ,
14+ gainGyroAngle = 1156 ,
15+ gainGyroRate = 146 ,
16+ gainMotorAngle = 7 ,
17+ gainMotorAngularSpeed = 9 ,
18+ gainMotorAngleErrorAccumulated = 3 )
19+
20+
21+ if __name__ == '__main__' :
22+ logging .basicConfig (level = logging .DEBUG ,
23+ format = '%(asctime)s %(levelname)5s: %(message)s' )
24+ log = logging .getLogger (__name__ )
25+
26+ log .info ("Starting BALANC3R" )
27+ robot = BALANC3R ()
28+ robot .main ()
29+ log .info ("Exiting BALANC3R" )
You can’t perform that action at this time.
0 commit comments