irMagician

package module
v0.0.0-...-a14f4c4 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2014 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

go-irMagician

GoDoc

Simple Go Library for irMagician

Installation

go get github.com/tknhs/go-irMagician

Usage

This example is for irMaigician T.

package main

import (
	"fmt"
	"log"

	"github.com/tknhs/go-irMagician"
)

func main() {
	m, err := irMagician.New("/dev/tty.usbmodem1421")
	if err != nil {
		log.Fatal(err)
	}

	t, err := m.GetTemperature()
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(t)
}

License

This library is licensed under the MIT license.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IrData

type IrData struct {
	Data       []int  `json:"data"`
	Format     string `json:"format"`
	Freq       int    `json:"freq"`
	Postscaler int    `json:"postscale"`
}

type Serial

type Serial struct {
	SerialObject io.ReadWriteCloser
}

func New

func New(name string) (*Serial, error)

func (*Serial) CaptureSignal

func (ser *Serial) CaptureSignal() error

Capture the IR Signal

func (*Serial) Close

func (ser *Serial) Close() error

func (*Serial) GetTemperature

func (ser *Serial) GetTemperature() (string, error)

Get the Temperature

func (*Serial) Play

func (ser *Serial) Play()

Play the IR Signal

func (*Serial) SaveIrData

func (ser *Serial) SaveIrData(filepath string) error

Save the IR Signal in Local

func (*Serial) SendIrData

func (ser *Serial) SendIrData(filepath string) error

Send the IR Signal from Local Data

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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