Solved

How do i switch tube light on and off from my vb program?

Posted on 2002-07-12
14
391 Views
Last Modified: 2012-06-21
How do i switch tube light on and off from my vb program? please dont consider this as a joke but this is possible.
0
Comment
Question by:dhavaljariwala
  • 2
  • 2
  • 2
  • +7
14 Comments
 
LVL 3

Expert Comment

by:Elmo_
ID: 7148656
Tube Light?  What do you mean?
0
 

Author Comment

by:dhavaljariwala
ID: 7148675
Llight or a fan any home appliances.
0
 
LVL 3

Expert Comment

by:Elmo_
ID: 7148699
Realisticly, I do not think that this is possible from a VB app.  But you can always try!!
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:Amitabh
ID: 7148778
you are talking of embedded programming. for this u need to get the API's of the hardware which will control the tubelight. i don't think this is possible through VB but the first step is to get the hardware and required API's from the vendor.

-A.Pandey
0
 
LVL 4

Expert Comment

by:gencross
ID: 7148883
This is off the top of my head, but I think you may be able to pick up some converters for an AC power network and then a module that a light would plug into that you could control through the computer.  The network would run through the electical wiring of the house and the module would plug into an outlet and the light would plug into the module.  The module would be able to receive commands from the computer to turn on and off the light.

I don't know if this is viable but check out this page http://www.symantec.com/homecomputing/network.html

You could alternatively use IR (InfraRed).  You would need remote control lighting and and IR port on your machine.  Of course, you would have to be in the same room as the lighting.  It would work just like a remote control.

That being said the problem that you run into when trying to accomplish something like this is communication.  You need to have a line of a communication (a wire or wave) to the device and then the device needs to be able to speak a language that the computer understands.  Right now most lights are "dumb".  They have lighting that will come on using voice commands.  They may have lighting that can be programmed to.

You should probably be able to pick something up that will work, but I can bet it will not be for the faint of heart, or the faint in pocketbook $$$.

Hope this helps.
0
 
LVL 3

Expert Comment

by:Lewy
ID: 7149174
Check out X10 home automation at www.x10.com
I've got some of there stuff and it's great.

The tech section has the details on how to control things from VB. It's a little hard to find.
0
 
LVL 3

Expert Comment

by:kenspencer
ID: 7149459
Hi,

I have just a comment.  Back in 1991 or so, my (soon to be) wife's daughter was dating some tech person that had his lights and stereo rack in a particular room controlled by voice (!) through a PC.  While I was in the room, he spoke the unit's activation command (which was 'Mr. Spock'), told it to lower the lights a couple of times, then raise the lights, then turn on his stereo.  It all happened as he spoke.  In light of this, I would have to believe that controlling many things with VB would be possible, given the right drivers and connectivity.

Ken
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7149536
I see code silmilar of in old VB3 days working with Serial/parallel port. Just i don't remember. I will try to find the source.
The problem is you need a device that could manage light and accept input from some of these ports.
0
 
LVL 3

Accepted Solution

by:
PNJ earned 250 total points
ID: 7149661
I have used a National Instruments card that plugs into one of the PCI slots of the PC. The card comes with and OCX that loads right into VB. It's dead easy to program - I've use it to control the movements of products down our production line. Obviously, this card is only an interface between the PC and the outside (hardware) world and you'd have to build hardware to wire up the lamps etc etc.

Visit them at http://www.ni.com/.
0
 
LVL 3

Expert Comment

by:PNJ
ID: 7149686
...for instance, have a look at this card: http://sine.ni.com/apps/we/nioc.vp?cid=10127&lang=US (which is a link from the NI site)
0
 
LVL 38

Expert Comment

by:PaulHews
ID: 7150118
At x10, check out the firecracker:

http://www.x10.com/firecracker/fc_offer_br1ab.htm

Step by step instructions for controlling from VB:

http://vboverdrive.extreme-vb.net/articles/firecracker.php3
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7150141
Optionally, if you have the device:

http://www.zealsoftstudio.com/vbio/
0
 

Author Comment

by:dhavaljariwala
ID: 7151048
Thank u for ur suggestions friends. If i'll find out the solution i'll definately mail to you. I know that this is possible.
0
 

Expert Comment

by:patelplanet
ID: 8295358
Yes it is Definitely Possible to control X10 modules from a VB program.I use a Firecracker Serial Port module and an OCX included VB exe to schedule the lighting at my place.

Please check my web site for further details:

Click Below:

http://patelplanet.com/x10/

Thanks & Regards
-Shrimant Patel-
http://patelplanet.com
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question