https://github.com/peterhellberg/microview
Go library used to remote control a MicroView
https://github.com/peterhellberg/microview
arduino go microview oled-display
Last synced: 2 months ago
JSON representation
Go library used to remote control a MicroView
- Host: GitHub
- URL: https://github.com/peterhellberg/microview
- Owner: peterhellberg
- License: mit
- Created: 2017-04-05T06:28:22.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-07T07:36:22.000Z (almost 9 years ago)
- Last Synced: 2025-01-14T07:11:26.841Z (about 1 year ago)
- Topics: arduino, go, microview, oled-display
- Language: Go
- Size: 12.7 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# microview

[](https://travis-ci.org/peterhellberg/microview)
[](https://goreportcard.com/report/github.com/peterhellberg/microview)
[](https://godoc.org/github.com/peterhellberg/microview)
[](https://github.com/peterhellberg/microview/blob/master/LICENSE)
Go library used to remote control a [MicroView](http://microview.io/)
## Requirements
- [MicroView - OLED Arduino Module](https://www.sparkfun.com/products/12923)
- [USB Programmer](https://www.sparkfun.com/products/12924)
- [Arduino IDE](https://www.arduino.cc/en/Main/Software)
## Install
### Go package
go get -u github.com/peterhellberg/microview
### MicroView Arduino Library
**Note:** This package requires the use of a newer version of the
[MicroView Arduino Library](https://github.com/geekammo/MicroView-Arduino-Library)
(`v1.07b` or later) than what is currently available in the Arduino Library Manager.
So just follow these steps instead:
1. Change directory to Arduino's main directory (`~/Documents/Arduino/` in my case)
2. cd libraries
3. mkdir MicroView
4. cd MicroView
5. git clone https://github.com/geekammo/MicroView-Arduino-Library.git .
### Arduino sketch
Now you need to upload the following sketch to your MicroView using the Arduino IDE
```arduino
#include
void setup() {
uView.begin();
uView.clear(PAGE);
Serial.begin(115200);
Serial.print("MicroView");
}
void loop() {
uView.checkComm();
}
```
## Example
```go
package main
import (
"flag"
"log"
"time"
. "github.com/peterhellberg/microview"
)
func main() {
name := flag.String("name", "/dev/cu.usbserial-DA00SSM3", "name of the serial port")
flag.Parse()
mv, err := OpenMicroView(*name, Delay(90*time.Millisecond))
if err != nil {
log.Fatal(err)
}
mv.Run(
RectFill(5, 5, 5, 15),
RectFill(25, 0, 30, 15),
Rect(1, 1, 20, 40),
Rect(40, 20, 20, 20),
Rect(40, 20, 15, 15),
Rect(40, 20, 10, 10),
Rect(40, 20, 5, 5),
)
}
```
