Skip to content

Latest commit

 

History

History
41 lines (30 loc) · 794 Bytes

README.md

File metadata and controls

41 lines (30 loc) · 794 Bytes

go-vacbot

A golang library for communicating with Ecovacs Deebot robot vacuums.

Inspired by sucks from William Pietri.

Quick Start

First create a config file similar to vacbot.example.json.

package main

import (
	"flag"
	"time"

	vacbot "github.com/skburgart/go-vacbot"
)

func main() {
	vacbotConfigFile := flag.String("vacbotconfig", "vacbot.json", "json file containing vacbot configuration")
	flag.Parse()

	v := vacbot.NewFromConfigFile(*vacbotConfigFile)
	v.SpinLeft()
	time.Sleep(2 * time.Second)
	v.StopMoving()

	v.SpinRight()
	time.Sleep(2 * time.Second)
	v.StopMoving()

	v.Forward()
	time.Sleep(2 * time.Second)
	v.StopMoving()

	v.CleanAuto()
	time.Sleep(5 * time.Second)
	v.CleanStop()
}