Check your build status in Travis CI by Sphero
Hello my dear friends. In this article we will learn how to check our travis ci build status by sphero.
What is Sphero?
Sphero is small spherical robot. More info you can find on official page and see it in this video.
Yes, this is just a toy. But this toy have development docs and many SDKs. So you can create applications, which will manipulate Sphero for your needs.
Travis CI
Travis CI is a hosted continuous integration service for the open source community. It is integrated with GitHub and can test many languages. I using Travis CI for my Open Source projects and for me good to know, if some my project have failed tests.
Code
I chouse to use Ruby to write “SBSC” (Sphero Build Status Checker). For Ruby today exist very good library for working with robots - Artoo. Let’s create Gemfile and add to it needed library:
Next we write code for for our “SBSC”:
So I created class “CISpheroRobot”, which have block “work”. In this method you can manipulate by sphero by object “sphero” with methods “set_color”, “roll”, etc. In the port you can see I used ‘/dev/tty.Sphero-GGY-AMP-SPP’. To find this info you can in terminal of MacOS “ls /dev/tty*”.
Result
Result you can see on this video (sorry for not good quality):
That’s all folks!