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
4 projects • 22 followers
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

Add projectSign up / Login