Code Monkey home page Code Monkey logo

travis-ci_wio-link's Introduction

Travis-ci_Pion-one Build Status

Description

This project shows how to use Wio Link and Travis CI to indicate the project compiled status through traffic lights by red and green.

Put the traffic lights in a conspicuous place, and let the code monkey like me breakdown. ha-ha

Action Steps

  • Step1: Configure the Wio Link, add 3 grove relays, let each relay control different color lights. Getting started with Wio Link
  • 升级Pion One固件,然后拿到三个Relay的Rest API
  • 把pion_one_execute.py放置在根目录,并且修改API常量为你的API
    red_led_on_api = "https://cn.iot.seeed.cc/v1/node/GroveRelayDigital0/onoff/1?access_token=774bdd528b05a2adf734301bfbdf10b0"
    red_led_off_api = "https://cn.iot.seeed.cc/v1/node/GroveRelayDigital0/onoff/0?access_token=774bdd528b05a2adf734301bfbdf10b0"
    green_led_on_api = "https://cn.iot.seeed.cc/v1/node/GroveRelayDigital2/onoff/1?access_token=774bdd528b05a2adf734301bfbdf10b0"
    green_led_off_api = "https://cn.iot.seeed.cc/v1/node/GroveRelayDigital2/onoff/0?access_token=774bdd528b05a2adf734301bfbdf10b0"
    orange_led_on_api = "https://cn.iot.seeed.cc/v1/node/GroveRelayDigital1/onoff/1?access_token=774bdd528b05a2adf734301bfbdf10b0"
    orange_led_off_api = "https://cn.iot.seeed.cc/v1/node/GroveRelayDigital1/onoff/0?access_token=774bdd528b05a2adf734301bfbdf10b0"
  • 本地测试:
    • 编译成功 $python pion_one_execute.py success
    • 编译失败 $python pion_one_execute.py failure
    • 编译进行中 $python pion_one_execute.py building
  • 修改.travis-ci, 把上述命令嵌入进去 开始使用travis-ci
    language: python
    python:
      - "2.7"   
    before_install:   
      - pip install requests   
      - python pion_one_execute.py building   
    install:   
    script:   
      - python helloworld.py      
    after_success:    
      - python pion_one_execute.py success   
    after_failure:   
      - python pion_one_execute.py failure   
  • 假设helloworld.py是你的项目。修改它故意设置一个错误,然后提交。一起见证奇迹吧!

动态效果

gif

travis-ci_wio-link's People

Contributors

awong1900 avatar lee-kevin avatar

Watchers

James Cloos avatar Jonathan.Bz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.