Golang Taipei Gathering #15 - 進擊的 Gobot!

Post on 16-Feb-2017

1.013 views 2 download

Transcript of Golang Taipei Gathering #15 - 進擊的 Gobot!

進擊的 Gobot!Attack on Gobot!kerkerj

image from gobot.io

Who am I

● kerkerj

● twitter: @kerkerj

● blog: blog.kerkerj.in (powered by hugo )

Today I’m going to share about

● Gobot● a little bit Arduino● Sphero

Gobot

Gobot is a framework for robotics, physical computing, and the Internet of Things, written in the Go programming language

Platforms

Drivers

And things I don’t know :P

Arduino

gort - To scan for connected devices, upload firmware, and more.

← My sensor is broken...Orz

NT$ 50

Arduino Blink using Gobot

Read the sample code, to understand how Gobot works.

$ vim ~/go/src/github.com/kerkerj/arduino_gobot/arduino.go

(or sample code from gobot.io)

read more:

● type Gobot● type Robot

Cats love it!

Maybe only my cat loves it …

What can Sphero do?

● Change light color● Rolling! Rolling! Rolling!● And Jump! (a little bit)

Official Gobot example for Sphero

In my demo

● I used Echo to create API endpoints to controll Sphero.○ Another micro web framework for Go.

● Use http request to set Sphero’s color or tell Sphero to roll...etc.

Sphero Demo

$ j gtg15

$ cd bin && ./sphero

$ open http://localhost:5566

End!

Demo project source: https://github.com/kerkerj/gtg15-demo

誠徵下次 gtg 講者 XD