-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
30 lines (24 loc) · 764 Bytes
/
main.go
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
package main
import (
"GoPixelBot/Arduino"
"GoPixelBot/DebugConsole"
"GoPixelBot/ScreenAnalyzer"
"image"
)
func main() {
var arduino = Arduino.Arduino{}
// Port value can be different on your system
arduino.ConnectArduino("COM5", 9600)
defer arduino.CloseConnection()
var debugConsole = DebugConsole.DebugConsole{}
/*
// I used this to debug my code with my smartphone while gaming. nc -lp 8888
debugConsole = DebugConsole.DebugConsole{Network: "tcp", Address: "192.168.1.10:8888"}
debugConsole.InitConnection()
defer debugConsole.CloseConnection()
*/
// 4 Pixel from center of the screen, my screen is 1080p
bounds := image.Rect(958, 538, 962, 542)
sa := ScreenAnalyzer.ScreenAnalyzer{}
sa.StartPixelBot(bounds, debugConsole, &arduino)
}