Go library used to remote control a MicroView
go get -u github.com/peterhellberg/microview
Note: This package requires the use of a newer version of the
MicroView Arduino Library
(v1.07b or later) than what is currently available in the Arduino Library Manager.
So just follow these steps instead:
- Change directory to Arduino's main directory (
~/Documents/Arduino/in my case) - cd libraries
- mkdir MicroView
- cd MicroView
- git clone https://github.com/geekammo/MicroView-Arduino-Library.git .
Now you need to upload the following sketch to your MicroView using the Arduino IDE
#include <MicroView.h>
void setup() {
uView.begin();
uView.clear(PAGE);
Serial.begin(115200);
Serial.print("MicroView");
}
void loop() {
uView.checkComm();
}
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),
)
}
