package
0.0.0-20181010003844-c75e8edb0d6f
Repository: https://github.com/jdevelop/golang-rpi-extras.git
Documentation: pkg.go.dev

# README

Read value from ADT MCP3008

Example

package main

import (
        "time"
        "fmt"
        mcp "github.com/jdevelop/golang-rpi-extras/mcp3008"
        )

func main() {

	const channel = 0

	// /dev/spidev0.0
	mcp, err := mcp.NewMCP3008(0, 0, mcp.Mode0, 500000)
	
	if err != nil {
		panic(err.Error())
	}

	for {
		fmt.Println(mcp.Measure(channel))
		time.Sleep(time.Second)
	}

}

# Functions

No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author

# Interfaces

No description provided by the author

# Type aliases

No description provided by the author