My HelloWorld into World of Connected electronics and IOT

Then God said, “Let there be light”; and there was light ! 

I wonder did God use IOT to control lights ?

Jokes apart it had been around two weeks since i had built anything physical or that’s hardware (on other hand we at Reinventio are daily building stuff that we hope will change education as we know it today !! ). I had been working with MEANJS stack at backend for weeks now and wanted some change. So This churned out in 2.5 hours to sooth my itch.

I have been hearing a lot about IOT and connected electronics buzz, but never had my chance to try hands on it till now, due to various issues (burnt 3.3V powersupply, non functioning ethernet module list grows on! ). So today i thought of why not try something with connected electronics.Nothing fancy but something simple, something like a small “HelloWorld” into Connected electronics and IoT.Although this has no I of IoT ,yet. The project is very simple,We have a 230VAC bulb which is to be controlled using your phone over bluetooth.

Here it is in flesh and blood!

Lets get into technicalities.

I have used ubiquitous HC05 module ,Arduino(or freeduino ) UNO along with some spares like 12VDC/220VAC 7Amp relay , L293D motor driver and a bulb ofcourse!.

HC05 module is very useful module you can invest into as it can communicate with other bluetooth device,say mobile or laptop or other HC05 using Serial communication easily .Hence providing wireless ability to your projects.

Here L293D is used because the feedback currents due to magnetic activities in Solenoids, motors and relays can potentially harm your micros and also your micros wont be able to drive enough current into your motors, These chips inturn isolates your arduino inputs and your inputs to motor hence nullifying any feedback current into arduinos and they have their own powersupply hence they can drive motors efficiently,So it is always advisable to connect your motors/solenoids/relays using HALF-H DRIVERS(also known as motor drivers).Read over the datasheet to know more about pin configs.

Relay is another piece of interesting device i was always fascinated about!.They enable you to control high voltage line(like 230VAC) using low 12VDC using electromagnets and contact switches inside.


Image source wikipedia

In practical relay would look like a box with pins over it, if you are lucky you will have diagrams on it too. Relays have information about voltage they can handle on primary side( here 12-18VDC), Voltage and amperage they can handle on secondary side(here 230V AC and 7A). I used a SPDT relay with 12V/230V 7A ratings.

So here is the final product put into one!


Code is pretty simple, You can have a look at  my github repo

And finally you will need this opensource app called as blueterm in your mobile to communicate with arduino. Any app would do but i recommend this one for being opensource!. You can even write your own custom app for communication over bluetooth(i want to try that real soon).

You can connect multiple devices over multiple relay and transistors(instead of h bridges if you prefer to save space and money) and control your home appliances using this ! quite simple but nonetheless useful!

That’s all folks!

Happy hacking, happy making!

All the above content and code goes under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Creative Commons License

HelloConnect by Rohit Shetty is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

PalmFollowing CDDeck

So it was Christmas !! .World was delighted and happy with all the cakes,dinner and gifts, but me? well i had an itch to scratch :p So here is something i hacked after spending lots of time dealing around with Node.js,MEAN stack and backend stuff which became at once mundane 🙂 (Hey i love that too, but making something, is refreshing :p )


So what happens in nutshell is CD deck follows your hands.

if you push your hand towards deck then deck moves inside, and if you pull your hand back, voila deck follows out towards your hand.This is how it works like an enchanted CDDeck that follows your palm!

I Scavenged old CPU for CD deck, figured out the working and connected it to Motor driver L293D.Basically a motor driver is used to protect micro controller from BackEMFs from motor and also to provide Motor with higher currents and voltages needed for operating(Which arduino ofcourse wont tolerate).
Motor driver was connected back to Arduino .

Opened CD Deck, with internals figured out

Now HCSR04 ,an ultrasonic range finder module is connected to arduino and uses NewPing library. HCSR04 is placed on cd decks front portion.

HCSR04 mounted on CD deck. connected to arduino


Arduino is coded to obtain distance to palm from CD deck’s front. Distance between 4 and 6 cm is designated to be stable. if distance less than 4 cm then arduino sends signal to Motor driver which in turn pulls deck back.
New distance is found and compared again, if it is in stable zone then process is halted. else continues .

Final Product with Motor drivers and stuff

Similarly if distance is more than 6 cm then arduino sends signal to motor driver to push the deck forward and again new reading is taking and compared and soo on.

The Striking feature here is System always wants to be in equilibrium. So it automatically adjusts itself.

This process sounds complicated , is very easy to be coded.

Hence the system acts as one whole entity, with its own sensor and actuators with brains and balances itself to stability.

Schematics of PalmDeckFollower


Have a look at video and happy making and hacking till then
( article to come soon 🙂 )



PS: Github link for code
Github link
All the above content and code goes under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.


Creative Commons License
PalmFollowerCDDeck by Rohit Shetty is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Hello World!!

Hello World!

Yeah, You read it right Hello World.The single-most popular phrase used by tech community while starting to learn something!.No wonder my first blog would be about it.After all this is how I learn ! 😉  .

As I was wondering how this all started,I stumbled across this,which pretty much wraps the history.

Because of my experience until now ,with pet-projects and couple of languages/platform .I believe writing a ” hello world!” program is the first big obstacle you will overcome while learning .No ,I am not kidding (For few among us this might be a hilarious idea to say hello world is a tough nut).I dont mean to imply that hello world is difficult or easy code to execute,but writing your first hello world will surely make you understand few important things

  1. That everything you have set up was right and ‘All is Well’.
  2. About the development cycle of this particular language/platform.
  3. The basic look and feel of the beast you are gonna conquer.

This applies well when you try learning a language by yourself with the help of  Mr.Google.For you are your own guide and you learn more by doing this(self-learning), than your learnt-from-class counterparts.

When I  was taught coding in Pre-University level ,it was in plain old boring TurboC. I was given code and asked to copy paste it, and make a keypress soup,And bang I had a plain Hello world! on black screen but damn ,I understood what those spooky lines are? NOPE.Then things went on I wanted to tryout Linux world! And Google being my best teacher,I found step by step how to code C in Linux using gcc as my compiler.

It explained the development cycle(Write,compile,run,write,compile…) of introduced me to text editors in platform,how to use GCC ,what happens at background ,what does ‘./’ stand for etc.

So by trying out ‘hello world’ I had learnt more than simple syntax of C.I learnt its development cycle,I got the feel of the beast.

starting a textED
using nano
gcc ftw
execute!Yeah baby


This is pretty much same for all language.And using  IDE will do more bad than good for beginners (only exception being for android development,which has loads of other stuff to manage,but it can be done without an IDE too).

“Hello world!” is more relevant to Android devs. Android development is fun,but for beginner it might be hell!.When you try to get hello world on-screen you can do it in many way like,

  1. XML way,direct hardcode
  2. XML way by setting in string.xml
  3. Java way to manipulate textview
  4. or pretty,just raise a Toast . :p

I recommend trying out all anyway.However,in the end you will be familiar with the development cycle and few basic concepts of android,the files and folders in project,and what file to manipulate to get what etc.

Then comes exciting hardware world,The micro-controllers

(i am still a beginner here)

2014-06-23-001713 2014-06-23-001758 2014-06-23-001811

The Hello world equivalent in HardWare that I tried was a blinking led and this helped me to grab the development cycle of write,compile,compile to hex,burn to MCU,write & so on….It also let me know the basics of MCUs like PORTs,Registers etc

So “Hello world!” is not  a meaningless ritual but a very important learning milestone in your path to Techdom.

Happy Hacking and making

(PS: Check this Page it has awesome collections of HelloWorld! s )