Skip to content

A simple Internet of Things (IoT) experiment, using a Genuino MKR1000 board to control 2 LEDs & monitor a potentiometer, via Thinger.io.

Notifications You must be signed in to change notification settings

LintangWisesa/Arduino_MKR1000_Thinger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

simplinnovation

Arduino MKR1000 & Thinger

A simple IoT (Internet of Things) experiment using Arduino/Genuino MKR1000 and Thinger IoT platform. Watch the video below (click here) to see its action, then follow the instructions to build your own!

Video MKR1000 Thinger

1. What You Need 🎁

To build this project, you need the following items:

2. Setup Virtual Device on Thinger 📱

  • First, you have to sign up or login to Thinger.io. Then create a virtual device: click Devices menu, and click +Add Device button. Fill out the forms: Device Id, Device description & Device credentials, then click Add Device.

    Setup_Thinger_Device

3. Schematics 🔧🔨

  • Connect your parts to Arduino MKR1000 as the following picture:

    schematics

4. Sketch 📋

  • Make sure the WiFi101 & Thinger library are installed. Open Arduino IDE then copy the sketch below. Insert your Thinger username, Device ID, Device Credentials, WiFi name & WiFi password. Make sure you have chosen the right option for Board and Port under Tools menu. Upload it!

    #define _DISABLE_TLS_
    #include <WiFi101.h>
    #include <ThingerWifi101.h>
    
    #define USERNAME "your_thinger_username"    // Thinger username
    #define DEV_ID "your_device_id"             // Thinger device ID
    #define DEV_CRED "your_device_credential"   // Thinger device credential
    
    #define SSID "your_wifi_name"               // wifi SSID
    #define SSID_PASSWORD "your_wifi_password"  // wifi password
    
    ThingerWifi101 thing(USERNAME, DEV_ID, DEV_CRED);
    
    void setup() {
        pinMode(0, OUTPUT);
        thing.add_wifi(SSID, SSID_PASSWORD);
        thing["led"] << digitalPin(0);
        thing["led2"] << analogPin(1);
        thing["pot"] >> outputValue(analogRead(A0));
    }
    
    void loop() {
        thing.handle();
    }

5. Setup Dashboard on Thinger 📱

  • Go to Dashboards menu & click +Add Dashboard button. Then fill out the forms: Dashboard Id, Dashboard name & Dashboard description, then click Add Dashboard button.

    Setup_Thinger_Dashboard

  • Go to your dashboard, then create widgets to control and/or monitor your device. On your dashboard click +Add Widget & feel free to use any Thinger's widgets. On this project, I use:

    • On/Off State (to control my LED on/off),
    • Slider (to control the brightness of my LED),
    • Donut Chart (show my potentiometer value as a gauge), and
    • Time Series Chart (show my potentiometer value as a bar graph).

    Setup_Thinger_Dashboard

6. Have Fun! 😎

  • After everything is done, make sure your Arduino MKR1000 has a good internet connection. On your Thinger's dashboard you can control your LEDs & monitor your potentiometer value! Have fun!

Lintang Wisesa 💌 lintangwisesa@ymail.com

Facebook | Twitter | Google+ | Youtube | :octocat: GitHub | Hackster

About

A simple Internet of Things (IoT) experiment, using a Genuino MKR1000 board to control 2 LEDs & monitor a potentiometer, via Thinger.io.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages