Make default arguments bold

This commit is contained in:
Ben Nuttall
2015-10-18 12:28:53 +01:00
parent d9bbed2cdf
commit d61f0ff5ec
2 changed files with 24 additions and 24 deletions

View File

@@ -48,8 +48,8 @@ button = Button(pin=2, pull_up=False)
| Method | Description | Arguments |
| ------ | ----------- | --------- |
| `wait_for_press()` | Halt the program until the button is pressed. | `timeout` - The number of seconds to wait before proceeding if no event is detected. Default: `None` |
| `wait_for_release()` | Halt the program until the button is released. | `timeout` - The number of seconds to wait before proceeding if no event is detected. Default: `None` |
| `wait_for_press()` | Halt the program until the button is pressed. | `timeout` - The number of seconds to wait before proceeding if no event is detected. **Default: `None`** |
| `wait_for_release()` | Halt the program until the button is released. | `timeout` - The number of seconds to wait before proceeding if no event is detected. **Default: `None`** |
### Properties
@@ -91,8 +91,8 @@ pir = MotionSensor(4)
| Method | Description | Arguments |
| ------ | ----------- | --------- |
| `wait_for_motion()` | Halt the program until motion is detected. | `timeout` - The number of seconds to wait before proceeding if no motion is detected. Default: `None` |
| `wait_for_no_motion()` | Halt the program until no motion is detected. | `timeout` - The number of seconds to wait before proceeding if motion is still detected. Default: `None` |
| `wait_for_motion()` | Halt the program until motion is detected. | `timeout` - The number of seconds to wait before proceeding if no motion is detected. **Default: `None`** |
| `wait_for_no_motion()` | Halt the program until no motion is detected. | `timeout` - The number of seconds to wait before proceeding if motion is still detected. **Default: `None`** |
### Properties
@@ -130,8 +130,8 @@ light = LightSensor(4)
| Method | Description | Arguments |
| ------ | ----------- | --------- |
| `wait_for_light()` | Halt the program until light is detected. | `timeout` - The number of seconds to wait before proceeding if light is not detected. Default: `None` |
| `wait_for_dark()` | Halt the program until darkness is detected. | `timeout` - The number of seconds to wait before proceeding if darkness is not detected. Default: `None` |
| `wait_for_light()` | Halt the program until light is detected. | `timeout` - The number of seconds to wait before proceeding if light is not detected. **Default: `None`** |
| `wait_for_dark()` | Halt the program until darkness is detected. | `timeout` - The number of seconds to wait before proceeding if darkness is not detected. **Default: `None`** |
### Properties

View File

@@ -43,10 +43,10 @@ led = LED(17)
| `on()` | Turn the LED on. | None |
| `off()` | Turn the LED off. | None |
| `toggle()` | Toggle the LED. If it's on, turn it off; if it's off, turn it on. | None |
| `blink()` | Make the LED turn on and off repeatedly. | `on_time` - The amount of time (in seconds) for the LED to be on each iteration. Default: `1` |
| | | `off_time` - The amount of time (in seconds) for the LED to be off each iteration. Default: `1` |
| | | `n` - The number of iterations. `None` means infinite. Default: `None` |
| | | `background` - If True, start a background thread to continue blinking and return immediately. If False, only return when the blink is finished (warning: the default value of n will result in this method never returning). Default: `True` |
| `blink()` | Make the LED turn on and off repeatedly. | `on_time` - The amount of time (in seconds) for the LED to be on each iteration. **Default: `1`** |
| | | `off_time` - The amount of time (in seconds) for the LED to be off each iteration. **Default: `1`** |
| | | `n` - The number of iterations. `None` means infinite. **Default: `None`** |
| | | `background` - If `True`, start a background thread to continue blinking and return immediately. If `False`, only return when the blink is finished (warning: the default value of n will result in this method never returning). **Default: `True`** |
### Properties
@@ -88,10 +88,10 @@ buzzer = Buzzer(3)
| `on()` | Turn the buzzer on. | None |
| `off()` | Turn the buzzer off. | None |
| `toggle()` | Toggle the buzzer. If it's on, turn it off; if it's off, turn it on. | None |
| `blink()` | Make the LED turn on and off repeatedly. | `on_time` - The amount of time (in seconds) for the LED to be on each iteration. Default: `1` |
| | | `off_time` - The amount of time (in seconds) for the LED to be off each iteration. Default: `1` |
| | | `n` - The number of iterations. `None` means infinite. Default: `None` |
| | | `background` - If True, start a background thread to continue blinking and return immediately. If False, only return when the blink is finished (warning: the default value of n will result in this method never returning). Default: `True` |
| `blink()` | Make the LED turn on and off repeatedly. | `on_time` - The amount of time (in seconds) for the LED to be on each iteration. **Default: `1`** |
| | | `off_time` - The amount of time (in seconds) for the LED to be off each iteration. **Default: `1`** |
| | | `n` - The number of iterations. `None` means infinite. **Default: `None`** |
| | | `background` - If `True`, start a background thread to continue blinking and return immediately. If `False`, only return when the blink is finished (warning: the default value of n will result in this method never returning). **Default: `True`** |
### Properties
@@ -139,19 +139,19 @@ led = RGBLED(2, 3, 4)
| `on()` | Turn all the LEDs on (makes white light). | None |
| `off()` | Turn all the LEDs off. | None |
| `toggle()` | Toggle the LED. If it's on (at all), turn it off; if it's off, turn it on. | None |
| `blink()` | Make the LED turn on and off repeatedly. | `on_time` - The amount of time (in seconds) for the LED to be on each iteration. Default: `1` |
| | | `off_time` - The amount of time (in seconds) for the LED to be off each iteration. Default: `1` |
| | | `n` - The number of iterations. `None` means infinite. Default: `None` |
| | | `background` - If True, start a background thread to continue blinking and return immediately. If False, only return when the blink is finished (warning: the default value of n will result in this method never returning). Default: `True` |
| `blink()` | Make the LED turn on and off repeatedly. | `on_time` - The amount of time (in seconds) for the LED to be on each iteration. **Default: `1`** |
| | | `off_time` - The amount of time (in seconds) for the LED to be off each iteration. **Default: `1`** |
| | | `n` - The number of iterations. `None` means infinite. **Default: `None`** |
| | | `background` - If `True`, start a background thread to continue blinking and return immediately. If `False`, only return when the blink is finished (warning: the default value of n will result in this method never returning). **Default: `True`** |
### Properties
| Property | Description | Type |
| -------- | ----------- | ---- |
| `red` | The brightness value of the red LED (0 to 1). | Integer |
| `green` | The brightness value of the green LED (0 to 1). | Integer |
| `blue` | The brightness value of the blue LED (0 to 1). | Integer |
| `color` | The brightness values of the three LEDs (0 to 1). | Tuple |
| `red` | The brightness value of the red LED (`0` to `1`). | Integer or Float |
| `green` | The brightness value of the green LED (`0` to `1`). | Integer or Float |
| `blue` | The brightness value of the blue LED (`0` to `1`). | Integer or Float |
| `color` | The brightness values of the three LEDs `(0, 0, 0)` to `(1, 1, 1)`. | Tuple |
## Motor
@@ -182,6 +182,6 @@ motor = Motor(forward=17, back=18)
| Method | Description | Arguments |
| ------ | ----------- | --------- |
| `forward()` | Drive the motor forwards. | `speed` - Speed at which to drive the motor, `0` to `1`. Default: `1` |
| `backward()` | Drive the motor backwards. | `speed` - Speed at which to drive the motor, `0` to `1`. Default: `1` |
| `forward()` | Drive the motor forwards. | `speed` - Speed at which to drive the motor, `0` to `1`. **Default: `1`** |
| `backward()` | Drive the motor backwards. | `speed` - Speed at which to drive the motor, `0` to `1`. **Default: `1`** |
| `stop()` | Stop the motor. | None |