Zorg Drivers for Grove

For full documentation visit zorg-grove.readthedocs.org.

Contents:

LCD Driver

Documentation for the Grove RGB LCD I2C driver.

class zorg_grove.lcd.LCD(options, connection)[source]

Bases: zorg.driver.Driver

backlight_color(red, green, blue)[source]

Set RGB color for the back light.

backlight_off()[source]

Turns off the back light. Does so by setting the color to black.

backlight_on()[source]

Turns on the back light. Does so by setting the color to white

Turns off the cursor blinking character.

Turns on the cursor blinking character.

clear()[source]

Clears display and returns cursor to the home position (address 0).

cursor_off()[source]

Turns off the cursor.

cursor_on()[source]

Turns on the cursor.

display_off()[source]

Sets Off of all display (D), cursor Off (C) and blink of cursor position character (B).

display_on()[source]

Sets On of all display (D), cursor On (C) and blink of cursor position character (B).

home()[source]

Returns cursor to home position.

print_string(characters)[source]

Prints characters on the LCD. Automatically wraps text to fit 16 character wide display.

set_cursor(col, row)[source]

Sets cursor position.

start()[source]

Microphone Driver

Documentation for the Grove Sound Sensor driver.

class zorg_grove.microphone.Microphone(options, connection)[source]

Bases: zorg.driver.Driver

read_decibels()[source]

Returns the value of the current sound level in decibels.

Rotary Angle Sensor

Documentation for the Grove Rotary Angle Sensor driver.

class zorg_grove.rotary_angle_sensor.RotaryAngleSensor(options, connection)[source]

Bases: zorg.driver.Driver

This may also be known as a potentiometer.

read_angle()[source]

Read and return the current angle of the sensor in degrees. The rotary angle sensor produces analog output between 0 and Vcc (D1).

Servo

Documentation for the Grove Servo driver.

class zorg_grove.servo.Servo(options, connection)[source]

Bases: zorg.driver.Driver

get_angle()[source]

Get the current angle of the servo motor.

set_angle(angle)[source]

Set the angle of the servo motor.

Temperature Sensor

Documentation for the Grove Temperature Sensor driver.

class zorg_grove.temperature_sensor.TemperatureSensor(options, connection)[source]

Bases: zorg.driver.Driver

read_celsius()[source]

Read and return the celsius value of the temperature sensor. See data sheet: http://www.seeedstudio.com/wiki/images/a/a1/NCP18WF104F03RC.pdf

read_fahrenheit()[source]

Read and return the fahrenheit value of the temperature sensor.

read_kelvin()[source]

Read and return the kelvin value of the temperature sensor.

read_resistance()[source]

Read and return the resistive value of the temperature sensor.

Overview

This package includes python drivers for controling hardware devices. Typically, this package will not be used directly. The normal useage would be to include it as a device driver when configuring a robot using Zorg.

Installation

Install this package using

pip install zorg-grove

Usage

The driver should be included using the dot-notated format of the import string.

"zorg_grove.Servo"

Indices and tables