Nairaland Forum

Welcome, Guest: Join Nairaland / Login / Trending / Recent / New
Stats: 1274282 members, 1751838 topics. Date: Wednesday, 26 November 2014 at 12:15 PM

LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! (10952 Views)

Are you Learning C++? Let's learn together then! / Let's Learn Python-striktly Noobed!! / Let's Learn Object Oriented PHP! (1) (2) (3) (4)

(0) (1) (2) (3) (Reply) (Go Down)

LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 12:49am On Jun 01, 2011
IN THE SPIRIT OF CHANGE SWEEPING OVER THE PROGRAMMING SECTION OF NAIRALAND,
I THOUGH I WOULD PROVIDE SOME ORIGINAL MATERIAL TO WATER THE TASTE BUDS OF
WOULD-BE ASPIRING PROGRAMMERS. cheesy

NOW I SEEK TO INTRODUCE THE BASIC OF PC HOME AUTOMATION.
TOOK ME GOOGLE, GOOGLE AND MORE GOOGLE + SIX MONTHS OF RESEARCH  TO GET
THIS KNOWLEDGE WHICH I WILL OFFER TO ANYONE WHO CARES TO READ THIS POST!

NOW PROGRAMMING APPS TO CONTROL PIXELS ON THE SCREEN IS NO BIGGIE I THINK.
I MEAN, BOTH THE SOURCE CODE AND THE FINAL WORKING APPLICATION ARE ALL
IN THE SAME MEDIUM - AND THAT IS SOFTWARE, LIFE BEHIND THE MONITOR SCREEN.

BUT CODING BECOMES MORE FUN WHEN YOU CAN WRITE CODE TO . . . SAY SWITCH ON
YOUR ROOM LAMP EVERY EVENING, OR PUT ON THE WATER PUMP FOR EXACTLY 30 MINUTES
. . . OR MAKE YOUR HOUSE BLOW ALARM WHEN ANY STRANGE SOUND IS MADE! THE
LIST GOES ON AND ON AND ON, BUT ITS ALL ABOUT CONTROLLING ELECTRONIC
EQUIPMENT WITH THE AID OF ONE OF MAN'S GREATEST INVENTIONS - THE COMPUTER - WITH NOTHING
MORE THAN A FEW LINES OF CODE!

SO WE ARE GOING TO SEE HOW WE CAN CONTROL A VERY SMALL ELECTRONIC EQUIPMENT WITH THE AID OF
A FEW LINES OF PROGRAMMING CODE. ELECTRICAL ELECTRONICS AND COMPUTER ENGINEERING STUDENTS WILL
FIND THIS PIECE VERY INTERESTING AS IT MIXES BOTH SOFTWARE ENGINEERING WITH HARDWARE ENGINEERING!

OKAY. ENOUGH TALK! NOW LET'S GET DOWN TO THE ACTION PART!
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 12:52am On Jun 01, 2011
IN ORDER FOR US TO CONTROL ANY ELECTRONIC EQUIPMENT WITH THE COMPUTER, WE
MUST ASK OUR SELVES WHAT AND WHAT ARE GOING TO BE INVOLVED. THESE ARE

1. THE SOFTWARE: WHICH WILL BE BUILT USING OUR PROGRAMMING LANGUAGE

2. THE PORT: EVERY PHERIPERIAL DEVICE CONNECTED TO THE COMPUTER IS VIA SOME SORT
OF PORT :- THE USB PORT, SERIAL PORT, PARARELL PORT, SOUND PORT, MOUSE AND KEYBOARD
PORT, NETWORK CABLE PORT ETC, ETC. THE PORT IS HOW THE COMPUTER COMMUNICATES WITH THE
OUTSIDE PORT. (SO BASICALLY, WE ARE JUST GOING TO WRITE CODE TO CONTROL THE PORTS!)

3. THE POWER SUPPLY OF THE GADGET THAT WE WANT TO CONTROL: WILL THE POWER COME FROM
NEPA (AC) OR FROM BATTERY(DC) OR CAN IT BE POWERED BY THE PC (AS IN THE CASE OF MOUSE
AND KEYBOARD)
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 12:54am On Jun 01, 2011
NOW THAT WE KNOW WHAT TO LOOK OUT FOR LET US KNOW WHAT WE ARE GOING TO NEED!

1. THE SOFTWARE : WE ARE GOING TO USE VB6.0 FOR THIS.

2. THE PORT: THE SERIAL PORT (RS232)

3. POWER SUPPLY: WE ARE GOING TO TRY AND CONTROL A SMALL ELECTRONIC LIGHT EMMITING DOIDE (LED).THIS DEVICE
CAN BE POWERED BY THE PC SO THAT WILL BE OUR SOURCE OF POWER SUPPLY.
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 12:59am On Jun 01, 2011
MORE ABOUT THE SERIAL PORT:

FOR US TO CONTROL THE SERIAL PORT AND KNOW HOW THE PC CONTROLS IT LET'S RELAX
AND READ THIS PIECE FOR A WHILE. . .  cool

BELOW IS A PICTURE OF A SERIAL PORT.
YOU CAN ALWAYS SURELY FIND IT BEHIND ANY DESKTOP COMPUTER.
IT CONSISTS OF NINE PINS NUMBERED 1 TO 9. IF YOU LOOK CLOSELY, YOU WILL
SEE THE LITTLE NUMBERS 1 TO 9 ENGRAVED UNDER EACH PIN AS SHOWN IN THE
PICTURE.

Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 1:04am On Jun 01, 2011
HOW DOES THE PC CONTROL THE DEVICE THROUGH THE SERIAL PORT?

VERY GOOD QUESTION AT THIS POINT!
NOW ALLOW ME TO EXPLAIN!!!  grin


OKAY, THINK OF A BATTERY. IT HAS A POSITIVE POLE AND A NEGATIVE POLE, RIGHT?
POSITIVE IS DENOTED BY THE + SIGN AND NEGATIVE BY THE - SIGN.(PHYSICS 101! wink)

NOW THINK OF THE SERIAL PORT AS A BATTERY WHOSE POWER SUPPLY IS CONTROLLED BY
THE SOFTWARE THAT WE WRITE.

BY DEFAULT, THAT IS IN NORMAL MODE, THE "SERIAL PORT BATTERY" IS ALWAYS OFF AND
NO CURRENT IS FLOWING THROUGH IT. TO PUT IT "ON" WE NEED TO USE OUR PROGRAMMING LANGUAGE (IN THIS CASE VB) TO "SWITCH IT ON". WHEN WE RUN THE CODE, THE "SERIAL PORT BATTERY" IS ACTIVATED AND ANY DEVICE CONNECTED TO IT WILL HAVE CURRENT FLOWING THROUGH IT . OF COURSE TO "PUT OFF" OUR "SERIAL PORT BATTERY" WE WILL ALSO NEED OUR CODE TO DO THE JOB FOR US!

SO IF THE SERIAL PORT BEHAVES AS A BATTERY, THE NEXT QUESTION IS, WHERE ARE THE POSITIVE POLES
AND THE NEGATIVE POLES?


THE PINS WILL ACT AS THE POLES BUT TAKE NOTE: NOT ALL THE PINS ARE USED FOR POWER SUPPLY!

SO WHICH PINS ARE USED?

UNLIKE A CONVENTIONAL BATTERY THAT HAS TWO POLES, ONE + AND THE OTHER -, OUR "SERIAL PORT BATTERY" HAS 3 POLES.
PIN 4 (+), PIN 7 (+) AND PIN 5(-). wink

THIS MEANS THAT YOU CAN CONNECT YOUR DEVICE TO PINS 4 AND 5 OR PINS 7 AND 5.


CAN THE SERIAL PORT POWER A TOUCH LIGHT BULB OR A 60 WATT ELECTRIC BULB? 

ER, NO! IT HAS A VERY MINUTE ELECTRIC CURRENT shocked. JUST ENOUGH TO POWER A DIODE! wink


Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 1:08am On Jun 01, 2011
MORE ABOUT LIGHT EMMITING DOIDES(LED). smiley

A LED HAS A POSITIVE SIDE AND A NEGATIVE SIDE. THE NEGATIVE SIDE IS THE SIDE THAT HAS
A MARK BY THE SIDE OF THE GLASS PART AS SHOWN IN THE IMAGE BELOW.

IT NEEDS VERY SMALL AMOUNTS OF ELECTRIC CURRENT TO LIGHT AND AS SUCH IS THE BEST DEVICE
FOR US TO USE FOR OUR BASIC PC AUTOMATION TUTORIAL!

Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 1:11am On Jun 01, 2011
SETTING UP THE HARDWARE:

GOOD NOW LET'S GET TO THE REAL WORK! cheesy

GET YOUR LED, A SHORT LENGTH OF WIRE AND CONNECT IT TO YOUR SERIAL PORT
AS SHOWN IN THE DIAGRAM BELOW.


THAT'S ALL YOU HAVE TO DO. smiley YOUR HARDWARE IS NOW SET! NOW FOR THE SOFTWARE!
(MAKE SURE YOUR HANDS AND FEET ARE DRY O! IF NOT,YOU FIT HEAR WEAAAA!!! grin)

Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 1:15am On Jun 01, 2011
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn: 1:31am On Jun 01, 2011
SETTING UP THE SOFTWARE:

1. LAUNCH VB (IF YOU DO NOT HAVE IT, INSTALL IT!)


2.FORM THE DIALOUGE BOX SELECT AND DOUBLE CLICK THE "VB PRO EDITION CONTROLS" ICON.

3. ON THE FORM PLACE TWO COMMAND BUTTONS, COMMAND1 AND COMMAND2

4. LOOK FOR AN ICON ON THE TOOL BAR THAT LOOKS LIKE A TELEPHONE. THIS IS THE MSCOMM CONTROL.
THIS CONTROL (OR CLASS ACCORDING TO THE JAVA DUDES!) WILL ALLOW US TO CONNECT TO THE SERIAL PORT

NOW COPY AND PASTE THE FOLLOWING IN THE CODING WINDOW OF THE FORM.




Private Sub Command1_Click()
'This will open/on the pin 4 for power output
If MSComm1.PortOpen = True Then MSComm1.PortOpen = False
MSComm1.PortOpen = True
MSComm1.DTREnable = True
End Sub
Private Sub Command2_Click()
'This will close/off the pin 4 for power output
If MSComm1.PortOpen = False Then Exit Sub
MSComm1.DTREnable = False
MSComm1.PortOpen = False
End Sub
Private Sub Form_Load()
On Error Resume Next
command1.caption="ON"
command2.caption="OFF"
MSComm1.DTREnable = False
End Sub



NOW WHEN YOU RUN THE APPLICATION YOU WILL SEE A BUTTON LABELED "ON"
AND ANOTHER LABELED "OFF"

CLICK THEM TO PUT YOUR DIODE ON AND OFF.


CONGRATULATIONS! YOU ARE NOW AN ASPIRING COMPUTER AUTMATION DEVELOPER! cheesy


IF YOU ENCOUNTER ANY PROBLEMS PLEASE LET ME KNOW! HAVE FUN cool
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 6:29am On Jun 01, 2011
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn: 6:44am On Jun 01, 2011
HMM! IT'S SAD TO NOTE THAT SOME THINGS HAVEN'T REALLY CHANGED AFTERALL!
I AM SORRY I CANNOT POST THE FINAL PART OF THE TUTORIAL AS I HAVE BEEN BANNED THRICE FROM THIS FORUM.
REASONS ARE SPAM-LIKE ACTIVITIES BY ME.
I WONDER WHY? IF ONLY WE HAD A PR GUY ON THIS SITE WHO COULD RESPOND TO US! EVERY TIME YOU SEND MAILS FOR CLARIFICATION, ITS LIKE ASKING FOR THE KING OF THE GODS TO RESPOND TO YOUR REQUEST AND NO REPLIES EVER GET REPLIED TO! IT'S ANNOYING TO DO SOMETHING THAT MAY ADD TO OTHER'S KNOWLEDGE AND GET BANNED FOR YOUR EFFORTS. ITS LIKE THE SITE OWNERS ARE SAYING "TO HELL WITH YOU! PISS OFF WITH YOUR BLOODY TOPIC! WHO NEEDS IT! I'VE GOT ENOUGH TROUBLE WITH WHAT I'VE GOT HERE!" AND THE GUYS WHO COULD HAVE CONTRIBUTED SOMETHING USEFUL BESIDES ADVERTS AND MARKETING SPAM QUITELY LEAVE THE "GREAT FORUM" . . .
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn: 6:51am On Jun 01, 2011
LITTLE WONDER ALL WE GET IS WHAT WEE SEE sad . FUNNY. HOW ARE TUTORIALS ON MOBILE DEVELOPMENT GOING TO BE TAUGHT IF FOR HEAVEN'S SAKE WE CANNOT WRITHE OUT SAMPLE CODE? ! THIS IS THE PROGRAMMING SECTION. EVERY ONE WHO COMES TO A CANDY SHOP EXPECTS TO SEE CANDY, ANY ONE WHO GOES TO A BROTHEL EXPECTS TO SEE LOVE PEDDELERS SO WHO WOULDN'T EXPECT TO SEE CODE IN THE PROGRAMMING SECTION OF A FORUM??!!!

WHAT'S THE POINT OF HAVING A PROGRAMMING SECTION IN THE FIRST PLACE IF ONE CANNOT WRITE CODE??!!??!!
**@@xx angry angry IT BEATS MY SENSE OF REASON !
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 12:08am On Jun 06, 2011
Still figuring out a way to complete this tutorial without getting banned!
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by dellnet: 4:40pm On Jun 06, 2011
subscribed
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 8:33pm On Jun 06, 2011
AH! ITS GOOD TO SEE THAT SOME THINGS ARE REALLY CHANGING!
HMM! MUST ATTRIBUTE IT TO THE NEW MAN IN THE PROGRAMMING SECTION BLOCK! OKAY THE ABOVE POSTS SHOWS THE CODE. SO MY FIRST TUTORIAL IS COMPLETE!
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by dellnet: 2:31am On Jun 07, 2011
why do you type in caps?
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by gozzilla(m): 2:48pm On Jun 08, 2011
nice one. More!!!
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by sweetpawn1: 12:31pm On Jul 23, 2011
gozzilla:

nice one. More!!!

Thanks. Will work on something to present. . . smiley
dell_net:

why do you always type in caps?
Always? Come on that's not true. Am not typing in cap now am I? wink
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by GoodMuyis(m): 4:18pm On Jul 23, 2011
good if i book mark here but i'll later come back 4 it cool
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by njcdrich: 3:11pm On Jul 25, 2011
Helo, you know in this part of the world, majority of those that have do not want others to be like them. Now those who want to assist are discouraged.

Bros. Pls send me the full tutorial of of your lecture and the codes via my email: njcdiyah@yahoo.com.

Thanks, you are too much. James.
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by GoodMuyis(m): 8:45pm On Jul 25, 2011
njcdrich:

Helo, you know in this part of the world, majority of those that have do not want others to be like them. Now those who want to assist are discouraged.

Bros. Pls send me the full tutorial of of your lecture and the codes via my email: njcdiyah@yahoo.com.

Thanks, you are too much. James.

Good Idea from there Post the full TUT as attachment instead of Just Consuming Storage
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by emmaraj(m): 9:38pm On Jul 25, 2011
Nice, i've always wanted to try something like this, Thumbs Up "Sweet_pawn smiley"
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by emmaraj(m): 9:29pm On Jul 27, 2011
i have a few probelms,one Im using a laptop and i dont have such port, two, cant one use C++ for the software part?
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by smallnithin: 7:10am On Aug 05, 2011
there are number of ways to control that,

visit : Lamp Training
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by MisterMan(m): 10:37am On Aug 05, 2011
I would have loved to read this thread, but why are you shouting (caps lock)? Please be more considerate. I guess this is a great thread, but your shouting turns me off. This is a good example of how NOT to post.
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by NumberOne2(m): 5:25pm On Aug 06, 2011
Nice thread. I once worked with ladder programming language. I designed an alarm trigger system that sent alert when and event occurs. E.g. A mail or sms can be sent to a house owner when his room door is opened or when power goes out. I'll go dust up those books.

1 Like

Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by dipotech: 2:12pm On Aug 09, 2011
sweet pawn,please how can i get a VB6.0 compiler to start my own visual basic program development? Pls it's extremely urgent, i always appreciate your effort on this thread even though it's been long i saw ur contribution.

Anyone who can provide me a solution can help as well, thank you all.

1 Like

Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by ufumes(m): 11:32am On Aug 10, 2011
Hardware communication is one of my line of programming. I started with VB 6 (COMM PORT) now i have upgraded to visua studio 2008 (SERIALPORT1). Its quite interesting to be able to communicate with and control hardware connected to the serial port of a computer. If you need to develop any of such application, feel free to contact me (talktoumeh at yahoo dot ca)
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by dipotech: 11:02am On Aug 11, 2011
@ufumes pls can i get VB 6.0 IDE or compiler?
Thanks
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by ufumes(m): 1:11pm On Aug 11, 2011
dipotech:

@ufumes pls can i get VB 6.0 IDE or compiler?
Thanks
The compiler is not hard to come by, you would simply ask your software vendor for a Visual Studio 2008 software, or visual basic software. once you install it, you are good to go,
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by Tunee(m): 8:52pm On Aug 16, 2011
pls I need help on a similar project using vb.I want to record the start and stop times of a machine on a pc using vb nd also d duration d machine has been on after it has been switched off.I have an idea of aw to design the circuit but aw to write d program is my problem.I want to use a serial port nd visual studio 2008.
Re: LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! by ufumes(m): 7:57am On Aug 17, 2011
Tunee:

pls I need help on a similar project using vb.I want to record the start and stop times of a machine on a pc using vb nd also d duration d machine has been on after it has been switched off.I have an idea of aw to design the circuit but aw to write d program is my problem.I want to use a serial port nd visual studio 2008.

Its something that i can do, call me on 0806 781 7864 or (talktoumeh at yahoo dot ca) lets discuss it. Though am not into hardware electronics or design but i have programmed similar work for an electronics engineer

(0) (1) (2) (3) (Reply)

How Long Does It Really Take To Learn Programming( I Want To Know) / So You Want To Be A Programmer...? / C# - Capturing File Name From A FileUpload Control In Asp.net

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (0) (1) (2) (3) (4) (5) (6) (7) (8) (9)

Nairaland - Copyright © 2005 - 2014 Oluwaseun Osewa. All rights reserved. See Nairalist and How To Advertise. 90
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.