GithubHelp home page GithubHelp logo

rizhwan / az3166-iot-control-rgb-led-via-website Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 172 KB

Control rgb led via website. Work great on MXChip Az3166

C++ 100.00%
iot mxchip arduino az3166 vscode iot-application

az3166-iot-control-rgb-led-via-website's Introduction

What you need

A MXChip IoT DevKit board with a Micro-USB cable.
Knowledge of using Ardunio & Visual Studio Code IDE

Setup Environment

Please click the link below to set up your dnvironment
https://microsoft.github.io/azure-iot-developer-kit/docs/get-started/

Get Started

  1. Connect the board to your PC / MAC
  2. Verify & Upload
  3. OLED Screen should display the IP address
    Kiku
  4. Type the IP address on the web browser Kiku

Control

On your web browser you should see,

  1. Red, Green and Blue button.
  2. Turn On/Off button

^Click the following button to control RGB LED

Add different LED colour

You can set any colour by using RGB Color Codes.

Red: rgbLed.setColor(255, 0, 0);

Kiku

Green: rgbLed.setColor(0, 255, 0);

Kiku

Blue: rgbLed.setColor(0, 0, 255);

Kiku

For more colour, please visit https://www.rapidtables.com/web/color/RGB_Color.html

Add button

Line 143 onward

client.println("<p><a href=\"/orange\"><button class=\"button\">orange</button></a></p>");

Add navigation

Line 125 onward

else if (header.indexOf("GET /orange") >= 0)
{
 rgbLed.setColor(255, 128, 0);
}

az3166-iot-control-rgb-led-via-website's People

Stargazers

 avatar

Watchers

 avatar  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.