Skip to content

NeuralSpaz/ti-ina219

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

TI-INA219

golang library for Texas Instruments INA219 High-Side, I2C Out Current/Power Monitor

Example

package main

import (
	"fmt"
	"log"
	"time"

	ina219 "github.com/NeuralSpaz/ti-ina219"
)

func main() {
	// Create new sensor with an address of 0x41 and on i2c bus 1.
	Sensor1 := ina219.New(0x41, 1)
	for {
		select {
		case <-time.After(time.Second * 1):
			if err := ina219.Fetch(Sensor1); err != nil {
				log.Println(err)
			}
			fmt.Println(Sensor1)
		}
	}
}

About

golang library for Texas Instruments INA219 High-Side, I2C Out Current/Power Monitor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages