How to connect Pins input/output for the IDE - arduino

I have project that need to connect USB device to PC using arduino, The device have power from external power supply and 2 cables of data , so I have do like this :
Pin1,Pin2 = device usb data cabels.
Pin3,Pin4 = Pc usb data cabels.
My question is, how to connect Pin1 to Pin3, and Pin2 to Pin4. is there special Pins I need to connect those cables?
Thank you so much

Related

Adb for arduino UNO

i am working on a distance sensing app for android using arduino and ultrasound sensor.I found code that uses Abd for communication between android and arduino. The Abd used is for Arduino mega which has many more ports as compared to arduino Uno.I searched for Adb for uno but couldn't find it can anyone help me in finding Adb for Uno.If nothelp me with mapping of I/O ports form mega to uno.
int the adb of Mega :
DDRE 0x40 refers to Port E bit 6
DDRJ 0x08 refers to Port J bit 3
DDRJ 0x04 refers to Port J bit 2
So I need to move those IO pins to pins that Uno supports within Ports A,B,C,D and change the the DDRE & DDRJ references accordingly.
For two devices to communicate through USB one of them must act as a HOST device.
When connecting Arduino to your PC, your PC is the host.
When connecting Android to your PC, your PC is the host.
When connecting Android to the USB port of Arduino Mega, Arduino is the host.
If you (somehow) connected Android to Arduino UNO's single USB, There are no host and so they can't communicate.
You can over come this limitation by buying Arduino Uno's Host Usb Shield and connect Android to that Shield.

SIM900 module not responding on hardware COM port

I've got my sim900 module working with arduino by using their software serial library, however, I want to eliminate arduino from the equation and have serial communication directly to sim900 module.
I'm using putty as my terminal emulator. It's serial is configured to COM1 19200 8 N 1 the same as device manager configuration for this port.
I connect straight from hardware serial on my PCs motherboard into serial-to-ttl interface board which connects to sim900 module. The board has 4 pins - VCC GND TX RX. They're all connected to my sim900 hardware serial as follows: VCC=5V GND=GND TX=TX RX=RX (Yes I know that it's always actually TX=RX and RX=TX, but when I connect it that way my interface board doesn't blink any led to indicate a transfer whereas it does when I connect TX=TX and RX=RX). The switch on the module is set to hardware serial pins as well.
So the only thing that happens when I send AT commands such as AT or ATI and press enter is that puttys cursor comes back to the beginning of command that I typed. No response.
I'm thinking that I'm not doing something that the arduinos software serial port is doing when it sends commands to sim900.
Can anyone help please ? It's literally been days of trying different configurations with no results.
In that time besides getting sim900 working with arduino software serial I verified that the hardware serial port on my motherboard is working correctly and the interface board is working correctly as well.

USB to USB serial communication from PC to PC

I am currently connecting 2 PCs using serial communication and at this time I am using a USB to Serial converter, then a serial cable, then another USB to Serial converter going into the other PC in order to get the communication sent and received.
Is there a way to program the USB ports as COM ports without these converters and still be able to transfer the serial data over the USB using software rather than hardware, thus eliminating the need for the conversions and rather have just a straight USB cable to USB cable connection?
Thanks!

Atmega328p sending data through USB

I'm using the atmega328p and I would like to send data through the USB to use like the serial monitor in the arduino for code testing purposes, so I doesn't need an LCD to print data. I used USART when simulating my code in proteus, and I believe there is a similar approach using the data pins of the USB connector.
When you send data over the UART on the ATmega328, it is converted to serial over USB by the Arduino. The Arduino will enumerate as a virtual serial port on your computer, and you can connect to this with the serial terminal of your choice (screen, PuTTY, RealTerm, etc). The Arduino IDE also has an built-in serial monitor. Note that you cannot use this serial connection while programming the Arduino via the USB port, as it will interfere with the programming.
If you are using the hardware UART for other purposes, then you can use an external TTL serial-USB converter and SoftwareSerial on the Arduino.

Arduino MEGA ADK: read data from USB (not serial)

What is a way to read some data from the USB device TelosB Mote?
It sends packets of 12 octest, and all I want to do is to read two of them. I want to be able to set the transfer speed and the data buffer - I guess.
This board has an integrated USB device port. I've read about the USB shield 2 library, but I've seen it helps connecting it with an Android phone.
How can I fix this problem?

Resources