Skip to content

A Golang wrapper to the Phidgets C library

License

Notifications You must be signed in to change notification settings

sapienzaapps/gophidgets

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gophidgets Go Report Card

A Golang wrapper to the Phidgets C library

Install

go get "github.com/jrcichra/gophidgets/phidgets"

Example

t := phidgets.PhidgetTemperatureSensor{}
t.Create()
t.SetIsRemote(true)
t.SetDeviceSerialNumber(11111)
t.SetHubPort(0)
err = t.OpenWaitForAttachment(2000)
if err != nil {
    panic(err)
}
//Loop forever
for {
    fmt.Println("Temperature is", t.GetValue()*9.0/5.0+32)
    time.Sleep(time.Duration(5) * time.Second)
}

About

A Golang wrapper to the Phidgets C library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%