rgb

package
v0.1.35 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package rgb implements the RGB sensor. Warning: The code in this package might be transient. Stability is not guaranteed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RGB

type RGB struct {
	Name string
	// contains filtered or unexported fields
}

RGB represents an RGB sensor.

func New

func New(ctx context.Context, deps resource.Dependencies, sensors []string, sensorIndex int) (RGB, error)

New creates a new RGB sensor based on the sensor definition and the service config.

func (RGB) GetData

func (rgb RGB) GetData(ctx context.Context) ([]byte, func(), error)

GetData returns data from the RGB sensor. The returned function is a release function that must be called once the caller of GetData is done using the image.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL