Skip to content

Commit c38a0ec

Browse files
author
Charles Weir
committed
Documentation enhancements
1 parent c7f351b commit c38a0ec

3 files changed

Lines changed: 13 additions & 4 deletions

File tree

ExamplePrograms/DoorControl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class DoorControlApp(TkApplication):
2020
'''
2121

2222
def __init__(self):
23-
TkApplication.__init__(self, {'1': Sensor.ULTRASONIC_CONT }) # Compiler doesn't know these types.
23+
TkApplication.__init__(self, {'1': Sensor.ULTRASONIC_CONT })
2424
self.doorLocked = False
2525
self.addSensorCoroutine( self.openDoorWhenSensorDetected() )
2626

ExamplePrograms/MotorController.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class MotorControllerApp(TkApplication):
2626
'''
2727

2828
def __init__(self):
29-
TkApplication.__init__(self, {'1': Sensor.ULTRASONIC_CONT }) # Compiler doesn't know these types.
29+
TkApplication.__init__(self, {'1': Sensor.ULTRASONIC_CONT })
3030
self.pidSetting = PIDSetting()
3131

3232
def rotate(self, degrees):

docs/introduction.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,15 @@ As a taster, here's a coroutine function to detect presence via a sensor, open a
3030

3131
The actual implementation - which also supports user input to change the behavior at any time - is :class:`.DoorControlApp` in ``ExamplePrograms/DoorControl.py``
3232

33-
Why Objects
34-
===========
33+
Where to Find Everything
34+
========================
35+
36+
The Python module is at https://pypi.python.org/pypi/BrickPython
37+
38+
The source code is at https://github.com/charlesweir/BrickPython
39+
40+
Why Objects?
41+
============
3542

3643
Objects make programming easier. Objects can be intelligent (for example, the Motor object can know its speed); they
3744
can be easier to debug (Motor can print itself in a useful way); and they separate out concerns (you can deal with one
@@ -139,6 +146,8 @@ Example Applications
139146
* :class:`.DoorControlApp` is an example of more real-life functionality. It uses a sensor to detect an approaching person, opens a door for 4 seconds, then closes it again.
140147
On user input, it can 'lock' the door - closing it immediately and disabling it from opening again.
141148

149+
* :class:`.SimpleApp` has no UI, and simply rotates the motor on port A back and forth.
150+
142151
Other Environments
143152
==================
144153

0 commit comments

Comments
 (0)