I was wondering if someone could help me out, I have some code that listens to my twitter, and when I tweet it reads the tweet. I have a list of commands in the software and if the software reads that a tweet it carries out a command. So lets say I tweet "Play music" it starts playing my music.
I had an idea of being able to control my central heating using this system so that maybe I'm away on holiday for 2 weeks and so switch the central heating and hot water off but want to be able to switch it on before I leave to come home so that the house is warm (I live in Scotland) and the hot water is hot.
My plan was to maybe use a PIC16F688 and some relays, what I need help with is outputting data out my com port to switch the channels on. So it would be something like
If Tweet = "Heating on" then
comport2.Channel 1 = High
End If
Line 2 is the line that will cause me problems since as of yet I dont know how to send data out of a comport and what data to send.
Im using VB 2010 Express.
Have you seen phidgets.com ?
They have a bunch of different devices that interface with the world that are already made and have API to interface with them from any number of programming environments.
Not Renard or DIY, but quick and simple -- and not too expensive.
soakes94 wrote:
My plan was to maybe use a PIC16F688 and some relays, what I need help with is outputting data out my com port to switch the channels on. So it would be something likeIf Tweet = "Heating on" then
comport2.Channel 1 = High
End IfLine 2 is the line that will cause me problems since as of yet I dont know how to send data out of a comport and what data to send.
Im using VB 2010 Express.
Essentially, you need some hardware like the Renard board that many people here use... this receives messages via RS232 and turns on/off 230V devices. In our case, the device we're turning on/off is usually something like a string of lights or LEDs which is relatively low power (1 amp or less). If you want to switch high-power devices (e.g. heating) you'll need to replace the solid-state relays with actual relays.
To send commands to a Renard board, you send a message using the Renard protocol. If you build your own Renard-like board with your PIC and relays, you can decide your own protocol.
My plan was to design my own PCB using the PIC16F688 as the brain as I have no expereince in writing firmware but I understand how the renard boards work. So all I'm really looking todo is to be able to send the correct commands to the PIC from my own program. The bit I'm stuck at is sending data out a com port and what I need to send to make the pic do stuff.
Thanks
Steve
So the question is.. "How do I open up a COM port in VBasic, so that I can send commands over serial to the PIC".
I'm not a VB programmer so can't help too much, but sticking "vbasic how to open a com port" into google resulted in numerous hits, the top one of which was:
http://www.control.com/thread/1026198113
Which I think does cover what you are attempting to achieve.

