Interference with perifierals using c++

i want to control the electrical devices(fan ,bulb etc.)connecting with the computer using output ports of the comuter in using c++ language.But the difficulty is that how can i control the output ports of computer using c++?how the address of output port can be found?Send me the source code of program which will control brigtness of the bulb connected to the output ports of computer.


Share Send to a friend Watch Report
 
 

Posted Answers

Order by
 
7 thumbs up

don't be silly, you can do anything in any language you like. You could do it in visual basic if you wanted.  You have to interface with a device driver, or you can write directly to some output address if you want.  If you on a linux host open a correctly mapped "/dev/something" device and write to it, but you'll have to write something the hardware understands... it's your light bulb that must be hooked to some kind of addressible variable resistor that will adjust it's brightness based on some digital signal, or the contents of some buffer.  In order for an 'address' to make a difference, it has to be using Memory mapped I/O, so if for example you're using the serial port, and you have a controller on the serial port between your machine and the light bulb, you can open up the port's /dev/ttySx device and send data to it... but you cannot hook up just a device that doesn't have any controller to accept digital signals as valid input and expect to control it no matter what device you're working with.  In windows, use the win32 api to write to the serial port using, of all things, the serial driver, and in linux, open the device and fire away.  It has nothing to do with the language at all.


Posted 1 year ago ( permalink )
In reply to jatinder's question
dave.dolan was invited by Yedda to answer this question.

Rated as
Best Answer
0
2

Helpful?

line
line
line



 

Oh My God!Tongue out

Just the fact that you could answer this person's question in such detail is incredible. Your awesome. 

P.S. why would anyone want to do this with his/her fan or light bulb anyway?  KymCool


Posted 5 months ago ( permalink )
In reply to jatinder's question
Rated as
#2 out of 2
0
0

Helpful?

line
line
line



Sign in to participate

Got an answer for jatinder? Would you like to comment on the posted answers, or vote for the one which you think is the best?

Sign up for a free account, or sign in (if you're already a member).

Explore Related Questions

Other people asked questions on similar topics, check out the answers they received:


Can I install Windows XP on a Eee PC?

Can I install Windows XP on a Eee PC?
Submitted by souwiz 10 months ago
  • viewed 656 times

Last answer posted 10 months ago by gargamel


How do I restore my taskbar?

Somehow the task bar and start button has disappeared from my screen. How can I get it back?
Submitted by EJN 3 months ago
  • viewed 491 times

Last answer posted 3 months ago by Speedy_Gonzales


How do log onto two AIM screen names at once?

how do log onto two AIM screen names at once?
Submitted by fudge 4 months ago
  • viewed 1142 times

Last answer posted 11 days ago by yourmom54



» More...

Explore Related Posts in Forums

C drive missing from "My Computer"

and got them back but now the c drive icon is missing from the "My Computer" window and I don't know how to get it back. So is there anyway to get the c drive to show up in the My Computer window again

My C: drive access gone in My Computer!

in the C; Drive on/in My Computer being seen..still "stealth". I have win. XP Pro and all my drives display except C: (My Maxtor hard drive). Went into control

Computer Is Slow And Out Of Space On C:

My computer has a c: and an e: drive (external back up). My c: drive is only 40 gig and my e enough to know what else can be moved there to free up space on c: I am sure that is why my computer
» More...
Powered by
Feed - Subscribe to changes to this Q&A Blog

Explore Related Videos

Watch: Full-Length Vice Presidential Debate

Vice Presidential candidates Sen. Joe Biden (D-Del.) and Gov. Sarah Palin (R-Alaska) squared off in a highly anticipated debate Thursday, Oct. 2nd in St. Louis, Mo.

Tito Satya September - 25th -2008,...

Tito Satya September - 25th -2008, www.NYNepal.com , Nepali Movie , tito satya , Jirekhursani , meribasai , nepali comedy serial , Nepal News , Nepalnews , nepali community , nepali blogs , nepali articles , nepali songs , Model , Actress NYNepal.com - Nepali comedy serial www.nynepal.com , nepali comedy serial , tito satya , titosatya , meribassai , jirekhursani , nepali comedy video , online nepali , nepali news , nepali tv serial , free nepali tv , ntv , kantipur , nepali model , nepali songs , nepali movie , nynepal , comedy video , comedy nepal

No. 13 South Florida Crushes N.C. State,...

Grothe, No. 13 South Florida rough up N.C. State

Joe Biden at the Democratic National Jewish...

Joe Biden gives a speech at the Democratic National Jewish Convention in Washington, D.C.

Watch the Full Debate

Candidates John McCain (R-Ariz.) and Barack Obama (D-Ill.) participated in the first of three presidential debates on Friday, September 26th at the University of Mississippi. Though the intended topics were national security and foreign policy, the economy was at the forefront. Video by AP

Ogm + hormones = monstruosite_(vo)

http://worldwide.familyradio.org/fr/mp3/bible/ http://pagesperso-orange.fr/pensee.sauvage/telechrg/albrtg.pdf http://www.tarot.org.il/Library/Levi/Clavicules%20de%20Salomon.pdf http://www.hermetics.org/pdf/magic/DogmaEtRituel_Part_I.pdf http://www.rue89.com/ http://www.spike.com/video/infrared-goggle-hack/2880432?cmpnid=800&lkdes=VID_2880432 http://www.20minutes.fr/article/240345/Monde-Les-Americains-utilisent-le-plus-souvent-leur-arme-contre-eux-memes.php http://www.dailymotion.com/related/3367177/video/x28ket_offensive-de-creationistes-us_politics http://img530.imageshack.us/img530/7451/sarkornu2sy3.jpg http://www.dailymotion.com/relevance/search/Les%2Bnouvelles%2Barmes/video/x5pai2_bombes-a-fragmentation-irak-12_news http://www.dailymotion.com/relevance/search/Les%2Bnouvelles%2Barmes/video/x5bsvk_les-nouvelles-armes-12_webcam ttp://www.dailymotion.com/fr/featured/video/x5ucg9_excerpt-state-of-the-forest_shortfilms http://www.dailymotion.com/relevance/search/ICEBERG/video/x5gezx_iceberg-carre_news http://www.ordinateurs-de-vote.org/IMG/pdf/Qui_controle_le_vote_electronique.pdf http://www.dailymotion.com/relevance/search/jesus%2Bde%2Bnazareth/video/x3ogjt_jesus-de-nazareth-partie-1_family http://www.spiritist.org/larevuespirite/revue55.pdf http://www.onnouscachetout.com/themes/technologie/orion-valerian.php http://quantumfuture.net/fr/organicportals1_fr.htm

Fix Cam: Debate Night!

Read The Fix Video by Chris Cillizza / washingtonpost.com

Bill Clinton Holds First Rallies for Obama

Former President Bill Clinton hosts "Change We Need" rallies Wednesday in Orlando and Fort Pierce to support Sen. Barack Obama's presidential campaign. It's the first time Clinton has campaigned for Obama. Video by AP

C:\Documents and...

hi i love to be your friend i am mido 25 from egypt my email is mido3227@yahoo.com or mido.3227@hotmail.com plz add me now
» More...
Powered by