twitter using no ethernet shields

im planning to connect my arduino to my computer all the time through USB. i dont want to buy an ethernet shield since what im going to do is just an exhibition and it is expensive. all the codes i see here used ethernet shield to post messages on twitter. is there a way i can connect to twitter or a website that connects to it without using ethernet shields???

is there a way i can connect to twitter or a website that connects to it without using ethernet shields???

Sure, just use your computer like everyone else does. ;)

i need the arduino (using no ethernet shields) to initiate the connection, not manually...my arduino should connect to twitter through my PC, it should utilize the internet connection present in my PC, please help me

If you have a PC that runs along with the arduino, you can connect the arduino to the PC using a standard serial connection, then use the Twitter API and some sort of program to upload from the arduino to Twitter, without an ethernet shield.

wow...please give some details on that...im a newbie...and cant i just use a USB instead of serial

PHP will do it, thats if you can use PHP.

http://davidwalsh.name/update-twitter-php - just found this

Theres a bit of info around about getting data off Arduino into PHP. I only done a post about it last week on my site - http://www.johnhobson.ws/blog:3

Then you have the question of how your data is posted? Every hour, Every day or whenever something is trigger (Eg: when your Aircon gets turned on, Twitter the status.)

If its a recurring thing just run the script from PHP-cli like I have done

defiantly not the best way to set it up, but it works and I dont know any other languages to get it to work myself. I think perl or python would probably be better.

And the USB is just serial through a chip.

hmmm...this could work...here's what im goint to do: a code will be entered in a keypad if the code is correct, it will turn on a solenoid (lock is unlocked!) what i want is that if the solenoid was turned on, it will send post a message on twitter... am i goin to write a php code inside my arduino code? or i need a third party program... i am completely clueless in this php...please help me...

You'll need seperate code.

Basically, what the arduino can do is send data from it to the computer. That's about it, without further shields.

Now, you need to process that data and upload it to twitter. Using the language of your choice. PHP would work

im really sorry if my questions look stupid but how can php get the data from my arduino? what program do you use to program php?

Firstly your computer needs to run like a webserver, so you will need:

Apache web server PHP

10 seconds in google returned http://www.wampserver.com/en/ - have a look at that (if your using windows, if your using linux just search around, theres thousands of tutorials on it)

PHP is written in any text editor just like HTML. It has the extension .php - You need to then put the file into the Apache's known web directory and open it with a browser (eg: http://localhost/test.php )

The PHP file opens your serial port, gets the incoming data and then parses it to a format that you require. Then it posts the data to twitter via API. Im 99.9% certain there wont be a script already made like this. Your going to have to write your own/hack at an existing, close enough script (like the one I wrote)

Its not going to be easy for you. Maybe read a few PHP tutorials and try some code to get use to the language before you attempt to write your script.

one quick awkward question...is the serial port you are referring that the php will open is the same as the USB port my arduino is connected??

The PHP file opens your serial port, gets the incoming data and then parses it to a format that you require.

Have you actually done that? From what I've seen written, I don't think PHP can actually get data from a serial port.

Have you actually done that? From what I've seen written, I don't think PHP can actually get data from a serial port.

Depends on the OS. On linux, it can. On windows, it can't. The problem is with windows, though, not PHP.

The problem is with windows, though, not PHP.

Once again, that is total Bull Sh*t. It is a PHP problem. PHP for windows was made for file handling and apparently has no capability for serial port I/O. It can only write to the serial port in that a com port can be treated like a file. If it was a windows problem, then how can the serial monitor, hyper terminal, and other appropriately writen applications read/write the serial port?

Have you actually done that? From what I've seen written, I don't think PHP can actually get data from a serial port.

Ive never actually read from the serial port on windows. I have written to it though in my first ever PHP>Serial test. Your statement may be true though, only one way to find out I guess

You could use a long way around it

Shell_exec a COPY COM1 text.txt - just making sure you feed it an END OF FILE statement which I think is a 026 decimal or 1A hex

I dont know how exactly the data would be captured, I will try it tonight when I get home from work.

Or just change language. I used PHP as I could do it in my OS, if the tool doesnt work for you, dont use it :)