Things used in this project

Hardware components:
1434509556 android phone color
Android device
×1
102110017%206
MediaTek Labs LinkIt Smart 7688 Duo
×1
SeeedStudio Grove - Infrared Reflective Sensor
×4
Software apps and online services:
Platform logo
Thinger.io Platform
Intel XDK

Schematics

Circuit Diagram
Circuit wwf7t86fwv

Code

Frimware for linkit Smart DouArduino
/*
The Amazon_smart Medicine Dash source code for linkit smart Dou 
  author: Salah Uddin
  email:  akash.bangla@gmail.com
  last update : Feb 24, 2017
*/

#include <YunClient.h>
#include <ThingerYun.h>

//thinger.io credential
#define USERNAME "YOUR USER NAME" 
#define DEVICE_ID "YOUR DEVICE NAME"      
#define DEVICE_CREDENTIAL "YOUR CREDENTIAL"

//intialize the thinger.io
ThingerYun thing(USERNAME, DEVICE_ID, DEVICE_CREDENTIAL);
const int ledPin =  13;

// sensor pin declaration
int ir01 = 8;
int ir02 = 9;
int  ir03 = 10;
int ir04 = 11;

//for counting purpose
int count = 0; 

void setup() {
  pinMode(ledPin, OUTPUT);
  // make the sensors pin an input:
  pinMode(ir01, INPUT);
  pinMode(ir02, INPUT);
  pinMode(ir03, INPUT);
  pinMode(ir04, INPUT);

  // initialize bridge
  Bridge.begin();

 // pin control example (i.e. turning on/off a light, a relay, etc)
 //push data to the cloud
  thing["led"] << digitalPin(ledPin);
  thing["count"] >> outputValue(count);
}

void loop() {
  thing.handle();
  count = digitalRead(ir01)+digitalRead(ir02)+digitalRead(ir03)+digitalRead(ir04);
  
}

Credits

Kca60oheyevcphwhsubz
Salah Uddin

Technology and IoT Hacker, Robot Killer and Drone lover.

Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

Linkit One: Blowing an LED
Intermediate
  • 954
  • 27

Full instructions

In this tutorial I Will show you how to turn on an led with your mouth. The Led will turn on when start to blow the sound sensor.

Linkit One: Water Level Indicator
Intermediate
  • 1,063
  • 26

In this project we will learn on making water level indicator using linkit one. This project could help you save water more efficiently.

Understanding LinkIt ONE ScanNetworks
Intermediate
  • 900
  • 18

Protip

I found a sketch called "ScanNetworks" in the LWiFi library and decided to give it a try.

Vertical Hydroponic Farm
Intermediate
  • 30,843
  • 197

Work in progress

IoT Enabled Hydroponic Farm

Creating the Tweeting Viking Hat
Intermediate
  • 1,004
  • 20

Full instructions

I made a tweeting viking hat to show off that anyone could hear iBeacons.

Home Smart Home
Intermediate
  • 39,120
  • 152

Full instructions

Smart home system using MediaTek Linkit, Xbee, Arduino, Orange PI and Azure

Add projectSign up / Login