How to read data from USB port using C

c usb
10,660

I looked into the specifications of your board and it seems like it's a FTDI chip. This means it's exactly the same way you read from a serial port.

Here is how you program the serial port in Windows (it hasn't changed in a long time).

Share:
10,660
Hamra Rehan
Author by

Hamra Rehan

Updated on June 04, 2022

Comments

  • Hamra Rehan
    Hamra Rehan almost 2 years

    I have sensor node connected to USB port that sense temperature, humidity and light and send the data to PC. What piece of code will help me to read that data from the USB port in normal C. Application of the nodes is built on C using Eclipse.

  • Chris Stratton
    Chris Stratton almost 11 years
    Only if the device implements a USB-serial or Virtual Com Port type of interface. A lot of devices do, but it's far from the only possibility.
  • Eric des Courtis
    Eric des Courtis almost 11 years
    I agree with you but it was the most likely case.