Download E-books Programming Your Home: Automate with Arduino, Android, and Your Computer (Pragmatic Programmers) PDF

By Mike Riley

Take keep an eye on of your house! Automate domestic home equipment and lights, and know about Arduinos and Android smartphones. Create functions that leverage rules from this and different interesting new platforms.

In Programming Your Home, expertise fanatic Mike Riley walks you thru a number of customized domestic automation tasks, starting from a telephone software that indicators you to package deal deliveries at your entrance door to an digital protect puppy that would hinder undesirable visitors.

Open locked doorways utilizing your phone. gather a chicken feeder that posts Twitter tweets to inform you while the birds are feeding or while fowl seed runs low. Have your house communicate to you in the event you obtain electronic mail or let you know approximately vital occasions akin to the arriving of holiday makers, and masses more!

you are going to how one can use Android smartphones, Arduinos, X10 controllers and a big selection of sensors, servos, programming languages, internet frameworks and cellular SDKs. Programming Your Home is written for phone programmers, internet builders, expertise tinkerers, and a person who enjoys construction state-of-the-art, homemade digital projects.

This publication offers you the foundation and realizing to build outstanding automation services that might rework your place of dwelling into the neatest domestic on your neighborhood!

What You Need:

To get the main out of Programming Your Home, you will have a few familiarity with the Arduino platform besides a keenness for tinkering. you need to take pleasure in leading edge considering and studying routines in addition to have a few functional program improvement event. The tasks use quite a few elements together with sensors and actuators, cellular units, and instant radios, and we will even inform you the place you may get them.

Show description

Read or Download Programming Your Home: Automate with Arduino, Android, and Your Computer (Pragmatic Programmers) PDF

Similar Diy books

Measure Twice: Tips and tricks from the pros to help you avoid the most common DIY disasters

DIY tasks look quickly and simple. you begin considering that you’re repairing a crack within the ceiling, and sooner than you recognize it, you’re tearing out a dividing wall to create space for that new kitchen island. yet with no cautious making plans, the best fabrics and some professional assistance and tips, you’re likely to prove with a catastrophe than a dream domestic.

Do-It-Yourself Family: Fun and Useful Home Projects the Whole Family Can Make Together

“The genius of Eric Stromer’s booklet is displaying that selfmade tasks are an excellent solution to convey your loved ones jointly. whereas having fun with each one other’s corporation, you how to set available ambitions and to construct a bit self belief alongside the way in which. thanks, Eric, in your enthusiastic encouragement of confident kinfolk time (literally) and for sharing useful find out how to make an effort enjoyable and winning.

Archives for the Lay Person: A Guide to Managing Cultural Collections (American Association for State and Local History)

For volunteers or employees at small businesses, collections administration could be a daunting activity. data for the Lay individual is a guidebook for those that take care of old documents, photos, and collections yet would not have definitely the right specialist education. Lois Hamill presents functional, step by step suggestions for handling all features of archival collections, from acquisition, association, and outline to garage and safeguard.

Audel Air Conditioning Home and Commercial

This consultant will hold you cool Like its prior versions, this absolutely up-to-date guidebook is full of useful info on fitting, servicing, protecting, and trouble-shooting air-conditioning platforms. no matter if you are an AC expert, an self reliant fix technician, or a cost-conscious house owner, every little thing you wish is right here.

Extra info for Programming Your Home: Automate with Arduino, Android, and Your Computer (Pragmatic Programmers)

Show sample text content

Connect("tweetingbirdfeeder. sqlite3")​ ​​ ​# create database cursor​ ​sqlcursor = sqlconnection. cursor()​ ​​ ​# Initialize Twitter API item​ ​api = twitter. Api('Your_OAuth_Consumer_Key', 'Your_OAuth_Consumer_Secret', \​ ​ 'Your_OAuth_Access_Token', 'Your_OAuth_Access_Token_Secret')​ ​​ ​def transmit(msg):​ ​ # Get present date and time and structure it therefore​ ​ timestamp = datetime. now(). strftime("%Y-%m-%d %H:%M:%S")​ ​​ ​ # verify message and assign reaction parameters​ ​ if msg == "arrived":​ ​ tweet = "A chicken has landed at the perch! "​ ​ desk = "birdfeeding"​ ​ if msg == "departed":​ ​ tweet = "A poultry has left the perch! "​ ​ desk = "birdfeeding"​ ​ if msg == "refill":​ ​ tweet = "The feeder is empty. "​ ​ desk = "seedstatus"​ ​ if msg == "seedOK":​ ​ tweet = "The feeder has been refilled with seed. "​ ​ desk = "seedstatus"​ ​​ ​ print "%s - %s" % (timestamp. strftime("%Y-%m-%d %H:%M:%S"), tweet)​ ​​ ​ # shop the development within the SQLite database dossier​ ​ try:​ ​ sqlstatement = "INSERT INTO %s (id, time, occasion) \​ ​ VALUES(NULL, \"%s\", \"%s\")" % (table, timestamp, msg)​ ​ sqlcursor. execute(sqlstatement)​ ​ sqlconnection. commit()​ ​ except:​ ​ print "Could now not shop occasion to the database. "​ ​ move​ ​​ ​ # submit message to Twitter​ ​ try:​ ​ prestige = api. PostUpdate(msg)​ ​ except:​ ​ print "Could no longer publish Tweet to Twitter"​ ​ cross​ ​​ ​# major application loop​ ​try:​ ​ whereas 1:​ ​ # hear for inbound characters from the feeder-mounted XBee radio​ ​ message = XBeePort. readline()​ ​​ ​ # reckoning on the kind of message is received,​ ​ # log and tweet it therefore​ ​ if "arrived" in message:​ ​ transmit("arrived")​ ​​ ​ if "departed" in message:​ ​ transmit("departed")​ ​​ ​ if "refill" in message:​ ​ transmit("refill")​ ​​ ​ if "seedOK" in message:​ ​ transmit("seedOK")​ ​​ ​except KeyboardInterrupt:​ ​ # go out this system whilst the Control-C keyboard interrupt been detected​ ​ print("\nQuitting the Tweeting poultry Feeder Listener software. \n")​ ​ sqlcursor. close()​ ​ move​ Once the required datetime, serial, sqlite, and twitter libraries are loaded, we transparent the terminal window (sending a cls for home windows and a transparent for the other working system), connect with the receiving XBee radio serial port (the XBee that's connected to the pc through the FTDI cable). Then we connect with the tweetingbirdfeeder. sqlite3 database dossier we created previous and run an enormous whereas loop till the Control-C keyboard mixture is brought on so they can gracefully go out this system. If the hooked up XBee radio gets a message it acknowledges, we name the def transmit(msg) functionality that parses the msg variable, provides descriptive textual content to the development, saves the message to the database, and posts it to Twitter. With the Arduino operating and the XBee radios paired and powered, try the edge detections through touching the perch sensor and photocell sufficient instances to set off a number of occasion transmissions. Assuming no mistakes have been mentioned within the terminal window of the working script, open the tweetingbirdfeeder.

Rated 4.14 of 5 – based on 12 votes