element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Enchanted Objects
  • Challenges & Projects
  • Design Challenges
  • Enchanted Objects
  • More
  • Cancel
Enchanted Objects
Blog Enchanted Wardrobe: Building IoT Wardrobe
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: iayanpahwa
  • Date Created: 12 Jun 2015 7:15 PM Date Created
  • Views 552 views
  • Likes 3 likes
  • Comments 0 comments
  • enchanted_wardrobe
  • enchanted_iot_devices
Related
Recommended

Enchanted Wardrobe: Building IoT Wardrobe

iayanpahwa
iayanpahwa
12 Jun 2015

In the Last blog post(s) we used Yahoo Weather API under TEMBOO choreo to extract local weather information. The API returned data in XML form which we later parsed using Temboo Output filters and get needed information from the response. Now In this blog I'll show you three more powerful features of Temboo which is helping maker to integrate Digital/Analog input triggers and Actuators with their existing cloud APIs to build Internet Of Things based devices. Consider having a phone call when lights in room goes down a certain threshold now this can be achieved to hook a Light Sensor(LDR) reading continuous readings of ambient lights and monitoring the levels, if the level exceeds threshold it calls an API function which triggers phone, The digit pressed on your phone can be used to turn on the lights, hence this basic IoT device can be broken down into Input(LIGHT) cloud(PHONE CALL API SERVICE like NEXMO and TWILIO) and output say a light bulb. Keeping this approach in mind Temboo makes IoT easy to prototype as follows:

 

We already covered the cloud API part where weather data is coming from Yahoo API but in my project Enchanted Wardrobe I am looking to integrate the whole setup inside my wardrobe and want it to call the api and fetch information only when the wardrobe has been opened by me, this approach will have a lots of advantages like

--> Saving Energy and microcontroller free running cycles because I dont want it active all the time rather it is going to be used only few times in a day so why let it running for no reason?

--> It reduces the number of call to the server. Making unnecessary calls to APIs again and again in short interval of times overload them and they might block you from accessing them.

            The design is therefore smart, consumes less power and work only when needed(WIN).

 

 

Integrating input Trigger:


I want my wardrobe to enchants me weather only when I open it, Therefore I need some kind of mechanism to sense opening and closing of the doors. There are fancy door sensors available in the market in glossy casing but to keep the cost low am going to use a Magnetic REED switch, infact the fancy one has same mechanism inside them so why dont use it barely. This works as a normal switch but with a difference of passing current through them in the presence of a magnet. Hence i can integrate the switch on door of wardrobe connect it to my YUN and have a magnet in periphery opposite to the door hence deactivating it when the door is opened, this way i can sense the trigger. How REED switches work?image

 

The code is super simple, just use it with normal switch sketch inside arduino with pinMode(REED,INPUT_PULLUP); inside setup() and digitalRead(REED) inside loop before calling the api and using if else to check the opening of door.

 

A fancy way to do this is to tell this requirmentdirectly to temboo. In the page where we configured the API you can find the hyperlink which says is the choreo triggered by an input there you say yes and configured the pin for the api to get triggered as and select digital or analog triggered and suitable pin number with input. You can even hook up analog sensor using this approach.

 

However if you are using active low based triggered I've noticed that temboo generated code doesn't activated the pullup resistorby default so I recomend you doing that to avoid pin floating problems.

image

 

 

Actuating based on API responses

 

Similarly like triggering API based on input you can trigger an actuator like LED based on results obtained from API for ex: tuning on LED on pin13 if temperature of city >25'c or soimage

 

Thats how we can use powerfull feature of Temboo on Arduino Yun without even coding a single line. image

 

One more interesting feature that temboo offers is the ability to stream and store sensors reading to online cloud services like Google Big Query and Microsoft power BI, for this you can use WANT TO STREAM SENSOR DATA feature of temboo.image

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube