GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — goled/oled.go at main · superryanguo/goled Expand file tree/ Copy patholed.goMore file actions 35 lines (30 loc) · 591 Bytes / Copy patholed.goFile metadata and controls35 lines (30 loc) · 591 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 package main //#cgo CFLAGS: -I ./oledc/ //#cgo LDFLAGS: -L ./oledc -loledc -lwiringPi // #include <stdlib.h> // #include "./oledc/oled.h" // #include "./oledc/oled_fonts.h" import "C" import ( "fmt" "time" "unsafe" ) func OledInit() { C.oled_init() } func OledShow(s string) { cs := C.CString(s) defer C.free(unsafe.Pointer(cs)) C.ssd1306_clearDisplay() C.ssd1306_drawText(C.int(0), C.int(8), cs) C.ssd1306_display() } func main() { fmt.Println("Begin the show...", int(C.random())) OledInit() for { OledShow("Use the OLED SHOW") time.Sleep(500 * time.Microsecond) } } |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |