entities

package
v0.0.0-...-620027b Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2016 License: GPL-2.0 Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buzzer

type Buzzer struct {
	Pin      rpio.Pin
	RealTrue rpio.State
	IsOn     bool
}

func NewBuzzer

func NewBuzzer(pin rpio.Pin, realTrue rpio.State) *Buzzer

func (*Buzzer) Beep

func (b *Buzzer) Beep(t time.Duration)

func (*Buzzer) BeepAction

func (b *Buzzer) BeepAction(t, sleep time.Duration, times int)

func (*Buzzer) Off

func (b *Buzzer) Off()

func (*Buzzer) On

func (b *Buzzer) On()

type DS18B20

type DS18B20 struct {
	Pin rpio.Pin
}

func NewDS18B20

func NewDS18B20(pin rpio.Pin) *DS18B20

func (*DS18B20) GetDeviceFile

func (d *DS18B20) GetDeviceFile(index int) string

func (*DS18B20) ReadTemp

func (d *DS18B20) ReadTemp(index int) float64

func (*DS18B20) ReadTempRaw

func (d *DS18B20) ReadTempRaw(index int) []string

func (*DS18B20) Temperature

func (d *DS18B20) Temperature(index int) float64

type DigitalDisplayTM1637

type DigitalDisplayTM1637 struct {
	IC      *IC_TM1637
	Numbers []string
	IsOn    bool
}

func NewDigitalDisplayTM1637

func NewDigitalDisplayTM1637(pins map[string]rpio.Pin, realTrue rpio.State) *DigitalDisplayTM1637

func (*DigitalDisplayTM1637) Off

func (d *DigitalDisplayTM1637) Off()

func (*DigitalDisplayTM1637) On

func (d *DigitalDisplayTM1637) On()

func (*DigitalDisplayTM1637) SetNumbers

func (d *DigitalDisplayTM1637) SetNumbers(value string)

func (*DigitalDisplayTM1637) Show

func (d *DigitalDisplayTM1637) Show(str string)

type IC_74HC595

type IC_74HC595 struct {
	Pins     map[string]rpio.Pin
	RealTrue rpio.State
	Data     uint8
}

func (*IC_74HC595) Clear

func (d *IC_74HC595) Clear()

func (*IC_74HC595) FlushSHCP

func (d *IC_74HC595) FlushSHCP()

func (*IC_74HC595) FlushSTCP

func (d *IC_74HC595) FlushSTCP()

func (*IC_74HC595) SetBit

func (d *IC_74HC595) SetBit(bit rpio.State)

func (*IC_74HC595) SetData

func (d *IC_74HC595) SetData(data uint8)

type IC_TM1637

type IC_TM1637 struct {
	Pins     map[string]rpio.Pin
	RealTrue rpio.State
}

func (*IC_TM1637) Clear

func (t *IC_TM1637) Clear()

func (*IC_TM1637) SetBit

func (t *IC_TM1637) SetBit(bit rpio.State)

func (*IC_TM1637) SetByte

func (t *IC_TM1637) SetByte(data uint8)

func (*IC_TM1637) SetCommand

func (t *IC_TM1637) SetCommand(command uint8)

func (*IC_TM1637) SetData

func (t *IC_TM1637) SetData(address, data uint8)

func (*IC_TM1637) StartBus

func (t *IC_TM1637) StartBus()

func (*IC_TM1637) StopBus

func (t *IC_TM1637) StopBus()

type Led74HC595

type Led74HC595 struct {
	IC *IC_74HC595
}

func NewLed74HC595

func NewLed74HC595(pins map[string]rpio.Pin, realTrue rpio.State) *Led74HC595

func (*Led74HC595) IsOn

func (d *Led74HC595) IsOn(index uint) bool

func (*Led74HC595) Off

func (d *Led74HC595) Off()

func (*Led74HC595) OffForIndex

func (d *Led74HC595) OffForIndex(index uint)

func (*Led74HC595) On

func (d *Led74HC595) On()

func (*Led74HC595) OnForIndex

func (d *Led74HC595) OnForIndex(index uint)

func (*Led74HC595) RowStatus

func (d *Led74HC595) RowStatus() [8]bool

func (*Led74HC595) SetRow

func (d *Led74HC595) SetRow(status [8]bool)

type Tact

type Tact struct {
	Pin      rpio.Pin
	RealTrue rpio.State
	Status   bool
	// contains filtered or unexported fields
}

func NewTact

func NewTact(pin rpio.Pin, realTrue rpio.State) *Tact

func (*Tact) DeRegister

func (t *Tact) DeRegister(observer func(rpio.Pin, bool))

func (*Tact) IsOn

func (t *Tact) IsOn() bool

func (*Tact) NotifyObservers

func (t *Tact) NotifyObservers()

func (*Tact) Register

func (t *Tact) Register(observer func(rpio.Pin, bool))

func (*Tact) RegisterContains

func (t *Tact) RegisterContains(e func(rpio.Pin, bool)) int

func (*Tact) Update

func (t *Tact) Update()

func (*Tact) Watching

func (t *Tact) Watching()

type TactRow

type TactRow struct {
	Tacts    []*Tact
	Pins     []rpio.Pin
	RealTrue rpio.State
	// contains filtered or unexported fields
}

func NewTactRow

func NewTactRow(pins []rpio.Pin, realTrue rpio.State) *TactRow

func (*TactRow) DeRegister

func (t *TactRow) DeRegister(observer func([]bool))

func (*TactRow) IsOn

func (t *TactRow) IsOn(index int) bool

func (*TactRow) NotifyObservers

func (t *TactRow) NotifyObservers()

func (*TactRow) Register

func (t *TactRow) Register(observer func([]bool))

func (*TactRow) RegisterContains

func (t *TactRow) RegisterContains(e func([]bool)) int

func (*TactRow) RowStatus

func (t *TactRow) RowStatus() []bool

func (*TactRow) Watching

func (t *TactRow) Watching()

Jump to

Keyboard shortcuts

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