Skip to content
/ evb Public

EVB-specific functions for the ev3go ev3dev interface

License

Notifications You must be signed in to change notification settings

ev3go/evb

Repository files navigation

Gopherbrick

evb provides EVB-specific functions for the Go ev3dev interface

Build Status Coverage Status GoDoc

github.com/ev3go/evb depends on an ev3dev kernel 4.4.9-ti-rt-r25-11-ev3dev-bb.org or better.

Example code

package main

import (
	"image"
	"image/draw"
	"time"

	"github.com/ev3go/ev3dev/fb"
	"github.com/ev3go/evb"
)

func main() {
	evb.LCD.Init(true)
	defer evb.LCD.Close()

	// Render the gopherbrick to the screen.
	draw.Draw(evb.LCD, evb.LCD.Bounds(), gopher, gopher.Bounds().Min, draw.Src)

	time.Sleep(10 * time.Second)
}

var gopher = &fb.RGB565{
	Pix: []uint8{
		<snip image data bytes>
	},
	Stride: 440,
	Rect: image.Rectangle{
		Min: image.Point{
			X: 0,
			Y: 0,
		},
		Max: image.Point{
			X: 220,
			Y: 176,
		},
	},
}

About

EVB-specific functions for the ev3go ev3dev interface

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published