I know that usb cables have a v something, data-, data+, and ground. Is it possible to connect the data ones to an arduino uno and send and receive data? If not, what can I do to make it possible to transform usb data to arduino data?
Can I ask you how you usually program and communicate with your Arduino(s) ?
With a usb cable from my computer and to my arduino, but for this project I don't want it to always be connected to a computer because all I have is a desktop and would like to take it around places.
You said you don't want to connect it to a desktop.
It would be far more informative to tell us what you do want to connect it to.
I am going to have it powered with a 9 volt battery and once it is an arduino serial signal then I want to send it through a bluetooth module.
So, connect your BT module to your Arduino. What's the confusion?
The data +/- you think of in USB cables, are analogous to what your module probably has marked Tx/Rx, also marked on the Arduino, probably.
That is, the Tx/Rx pins are where the data goes out/ comes in from. If you had it in your head that you needed to hack apart the USB plug or cable to doodly doo with the actual data +/- cables, you would be very incorrect.
I want to connect a usb to an arduino that also has a bluetooth module. I want to know if there is any way I can connect the data cables without having to buy a usb host shield which is like $20 while doing the thing I am describing is only a few wires which I have a ton of. Again, the usb thing and bluetooth module are two separate things.
Everyone, I have done way more research. What I am looking for is the arduino Usb 2 serial micro. Thanks for the answers on here anyways. Also I did do research before creating the question.
You can directly connect a bluetooth module to an Arduino, taking the voltage levels into account.
Hook it up to two pins for rx and tx (not the rx and tx pins, that will interfere with the normal communication with the pc) and use software serial or one of the better alternatives to talk to the bluetooth module.
The following two diagrams may help you to visualize how data exchange takes place (at hardware level) between PC/Serial Monitor and the Arduino. These diagrams helped many disciples to understand the working principles of the UART Port related Arduino functions like: Serial.available();. serialEvent(),, and Serial.read();.
Fig-1
Fig-2
The Serial Monitor has two IO boxes to handle two events:
A: We enter a character (say, digit 7) in the input box and then click on the Send button. The L (built-in LED of UNO) at the Arduino side blinks for 7 times. (Assume that the MCU of the Arduino contains program to receive 7 and then blinks L for 7 times.)
(1) How does 7 begin its journey from the Input Box of Serial Monitor (Fig-1) and then arrive at the MCU (M10 in Fig-1) of the UNO?
(a) When the Send button is clicked, the 8-bit ASCII code of 7 (0x37 = 0011 0111) leaves the Serial Monitor and enters into the Frame Formatter (M3 in Fig-1). The frame Formatter re-arranges the data byte with LS-bit first and then appends start bit (LL) at the head of the data byte, parity bit (optional) at the tail of data byte, and then STOP bit (LH). These 11-bit form what we call asynchronous TTL Frame (asyncTTL) whose signal levels are TTL. The asyncTTL frame is serially transmitted with LSB-first and enters into M5 (Module 5, Fig-1) where the signal is transformed into USB Protocol and proceeds towards destination (M9 of Fig-1) via USB connector.
The Receiver Section of UART Port of UNO (Fig-1) somehow becomes ready with the original data (7 ---> 07); the RXRDY (Receiver Ready with valid data) signal becomes active. In the Arduino Platform, the RXRDY signal interrupts the MCU; the MCU goes to serialEvent() routine (the ISR) whether we utterly declare it or not in our program. However, there are some advantages that we can avail if the serialEvent() ISR is declared in the program. (We will see it later.)
The MCU goes to the serialEvent() ISR and automatically saves the received data byte in a 64-byte wide FIFO type buffer which the user program can access using Arduino's commands like Serial.available() and Serial.read().
B: We press K1 at the Arduino side with the intention that the character A will appear in the output box of the Serial Monitor. The character A, in fact, appears!