Offline
Newbie
Karma: 0
Posts: 34
|
 |
« on: November 19, 2011, 08:55:31 am » |
Hi, is this possible?
Connect Arduino to a PC with either USB or VGA. Arduino connects and then creates a folder/file on my computer?
I am NOT aware about how connection is made/initialize/works when connecting a usb/vga to an computer so I would like to get some guidance with that. Links or search terms would be good.
I am aware that arduino can interact with the computer as a keyboard for an example. I am using a PC, Windows 7 if that's matter.
Best regards!
|
|
|
|
|
Logged
|
|
|
|
|
Seattle, WA USA
Offline
Brattain Member
Karma: 316
Posts: 35593
Seattle, WA USA
|
 |
« Reply #1 on: November 19, 2011, 11:19:03 am » |
Connect Arduino to a PC with either USB or VGA. These are completely different hardware and software technologies. I don't see how you can consider them interchangeable in any way. The Arduino can be connected to a USB port. That is how you program it. The Arduino can not create a file on your PC. It can send data to a serial port. If there is an application running on the PC that monitors that serial port, that application can create a file on the PC, and write whatever it likes to the file (presumably based on data it got from the serial port, but that depends on the program).
|
|
|
|
|
Logged
|
|
|
|
|
Massachusetts, USA
Offline
Tesla Member
Karma: 98
Posts: 6389
|
 |
« Reply #2 on: November 19, 2011, 11:24:41 am » |
It should be possible with USB if you get a USB Host Shield or re-program the USB interface of the Arduino UNO to make it possible to emulate a USB keyboard. If you can create files using the physical keyboard it should be possible to create files using an emulated keyboard.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 34
|
 |
« Reply #3 on: November 19, 2011, 07:24:25 pm » |
Thank guys, are there any documents that shows how an interface connects to an pc? Like the win7 initialize an usb and interact to it? Thanks johnwasser I also thinks that an arduino could create/interact with the computer its connected to. I also want to know if an arduino could access the computer throw VGA (rs232). And that means not an answer like "no" or "not possible". Regards!
|
|
|
|
« Last Edit: November 19, 2011, 07:26:19 pm by dubz »
|
Logged
|
|
|
|
|
Pittsburgh, PA, USA
Offline
Faraday Member
Karma: 31
Posts: 2947
I only know some basic electricity....
|
 |
« Reply #4 on: November 19, 2011, 10:35:50 pm » |
http://www.obdev.at/products/vusb/index.htmlV-USB is a software-only implementation of a low-speed USB device for Atmel’s AVR® microcontrollers, making it possible to build USB hardware with almost any AVR® microcontroller, not requiring any additional chip.
Runs on any AVR microcontroller with at least 2 kB of Flash memory, 128 bytes RAM and a clock rate of at least 12 MHz. No UART, timer, input capture unit or other special hardware is required (except one edge triggered interrupt). Be sure to check the Projects pages out if only to see how little hardware can work. A USB HID keyboard set to feed a console window sure -can- run a PC! Setting that up can be automated on the PC side, possibly as a batch file run at Startup.
|
|
|
|
|
Logged
|
Examples can be found at Learning in the Main Site and at the Playground
|
|
|
|
Austin, TX
Offline
Faraday Member
Karma: 41
Posts: 5176
CMiYC
|
 |
« Reply #5 on: November 19, 2011, 11:12:11 pm » |
I also want to know if an arduino could access the computer throw VGA (rs232). And that means not an answer like "no" or "not possible". VGA is "Video Graphics Adapter." It is an output. You can't control anything through the VGA port on a PC. (So No, Not possible.) RS232 to a Serial Port which is input and output. Again, you can't directly control anything on a PC through RS232, unless you have software running on the PC. (So No, not directly possible.)
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 34
|
 |
« Reply #6 on: November 20, 2011, 08:39:56 am » |
Thanks again guys, so it is USB all they way then. So for any pc-controlling code to work there must be a program on the pc that establish the connection and listen for input.
If I buy a usb keyboard at the store and then connecting it to the pc, without any drivers/CD, then windows will try to search both offline and online for the drivers. How does that work? If I order a Atmega microprocessor and wiring that up with an usb port. Is it possible for me to make windows install the unit as an keyboard then? Or could I program a lib/dll that the windows shall install instead?
Regards!
|
|
|
|
|
Logged
|
|
|
|
|
Pittsburgh, PA, USA
Offline
Faraday Member
Karma: 31
Posts: 2947
I only know some basic electricity....
|
 |
« Reply #7 on: November 20, 2011, 09:02:24 am » |
Dubz, with USB HID you don't need drivers since they are standard in most O/S's.
You can make an ATTiny with only 8 pins look like a USB keyboard to many PC's for less than $5 in parts.
The 'control program' is called a Console Window, Command Terminal, Shell Interface. -Anything- that can type into one can do a lot to direct operations of the PC. And how hard is it to have a Console run at Startup?
|
|
|
|
|
Logged
|
Examples can be found at Learning in the Main Site and at the Playground
|
|
|
|
Massachusetts, USA
Offline
Tesla Member
Karma: 98
Posts: 6389
|
 |
« Reply #8 on: November 20, 2011, 09:07:34 am » |
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 34
|
 |
« Reply #9 on: November 20, 2011, 03:48:20 pm » |
Dubz, with USB HID you don't need drivers since they are standard in most O/S's.
You can make an ATTiny with only 8 pins look like a USB keyboard to many PC's for less than $5 in parts.
The 'control program' is called a Console Window, Command Terminal, Shell Interface. -Anything- that can type into one can do a lot to direct operations of the PC. And how hard is it to have a Console run at Startup?
Thanks! Will look it up  And thanks for all the response, very helpful! Best regards!
|
|
|
|
|
Logged
|
|
|
|
|
Pittsburgh, PA, USA
Offline
Faraday Member
Karma: 31
Posts: 2947
I only know some basic electricity....
|
 |
« Reply #10 on: December 01, 2011, 03:24:14 am » |
Awesome and scary at the same time!
|
|
|
|
|
Logged
|
Examples can be found at Learning in the Main Site and at the Playground
|
|
|
|
|