Raspberry Pi / PC USB connection in C++

I want to do an IO communication performance test with an Raspberry Pi (512 MB RAM, RASPBERRY PI TYPE B, incl. Ethernet). I want so send a trigger to a Raspberry Pi input. The Raspberry Pi should send the trigger via USB connection to a PC. The PC should create a response and send this response back to the Raspberry Pi. The response should set an IO output of the Raspberry Pi. The communication should be as fast as possible.

Raspberry Pi Program

This program should be written in C++ and compiled with VisualStudio 2010.

The connection between PC and Raspberry Pi has to be USB.

With start of the program it should connect automatically to the C++ program on the PC. The program should start up with the Raspberry Pi automatically.

The program should listen on a Raspberry Pi input. (You can define the pin)

And it should listen to the response from the C++ program on the PC.

With each trigger (0->1 signal) the Raspberry Pi should send a message to the PC program. This message should include the timestamp/tickcount/high performance counter [ms/µs/processor ticks] when the last Triggercount (§1) and the current trigger (§2) was received.

When the Raspberry Pi receive a Triggercount number from the PC program it should send the last 4 bits to the output.


Triggercount = 1 -> Output0 = 1, Output1 = 0, Output2 = 0, Output3 = 0;

Triggercount = 2 -> Output0 = 0, Output1 = 1, Output2 = 0, Output3 = 0;

Triggercount = 3 -> Output0 = 1, Output1 = 1, Output2 = 0, Output3 = 0;

Triggercount = 4 -> Output0 = 0, Output1 = 0, Output2 = 1, Output3 = 0;


Triggercount = 255 -> Output0 = 1, Output1 = 1, Output2 = 1, Output3 = 1;


Triggercount = 1001 -> Output0 = 1, Output1 = 0, Output2 = 0, Output3 = 1;


It could be a console application, no GUI needed.

Windows Program

This program should be written in C++ and compiled with VisualStudio 2010.

It should work under win XP and 7.

The program should wait for a messages from the Raspberry Pi.

With each received trigger, an internal trigger counter (Triggercount) should increase.

The program should print out in the console window the Triggercount, timestamp/tickcount/high perfomance [ms/µs/processor ticks] when a trigger was received and the two timestamps (§1),(§2) from the Raspberry Pi.


1,87324789,0, 2389478975

2, 87325788, 2389478987, 2389479982

3, 87326790, 2389479995, 2389480985

4, 87327792, 2389480999, 2389481987

5, 87328795, 2389482018, 2389482993


It could be a console application, no GUI needed.


I want to use Visual Studio 2010 to compile the project.

The delivery should include the program and the operating system for the Raspberry Pi. I will copy your delivery to a 4GB SD-card. The Program should start automatically with startup of the Raspberry Pi.

All parts should be usable for commercial purpose. (So check the license of the OS, tools and libs you are using)

I need the compiled solution with sample settings and all source code.

No installer, setup or graphical interface needed. Your source code should follow the current methods of development.

I expect a delivery after ~14 days.

Documentation & test

Provide a [login to view URL] which describes the basic steps to setup:

- How to copy the OS to the SD-card.

- The number of input and output pins on the Raspberry Pi.

- How to set the PC IP on the Raspberry Pi.

You have to test the following:

- Is the input and output working?

- Is the error handling working correctly?

- Is the time output working and the numbers correct?

Навыки: Программирование на C++, Linux, Микроконтроллер

О клиенте:
( 13 отзыв(-а, -ов) ) Munich, Germany

ID проекта: #5508342



Hi, I belive that there a couple of options to do this, but they are not simple at all. The problem is that, RasberryPi is a USB-host, and so is your PC. Communicating to USB hosts is not an easy task (without fu Больше

$555 USD за 10 дней(-я)
(23 отзывов(-а))

7 фрилансеров(-а) готовы выполнить эту работу в среднем за $1031


Hello Sir, I am interested in your project and hope to work with you in order to make this work. I can send you basic design which will convince you the capability of completing this project even before Больше

$555 USD за 10 дней(-я)
(39 отзывов(-а))

Hello, I have extensive experience working with Win / Linux. I program in VS2010/Eclipse. I have the necessary equipment available for testing.

$500 USD за 15 дней(-я)
(20 отзывов(-а))

Hello, Few questions, 1) Under what method do you think the USB connection should work? The pi can't make a usb slave/OTG so maybe you can share a bit more of the purpose of your device to understand? 2) You want C+ Больше

$777 USD за 20 дней(-я)
(15 отзывов(-а))

Can help... I am an Expert I have a type B model... Lets Start! Please start a Discussion with me and we can get started from there... Please check the past projects I have handled and check my reviews for what emplo Больше

$4000 USD за 30 дней(-я)
(10 отзывов(-а))

Expert in Raspberry Pi/Arduino/Custom AVR board Please visit [login to view URL] for portfolio. Thanks!

$555 USD за 10 дней(-я)
(9 отзывов(-а))

Hi, 1. I understand your projects: + Raspberry Pi (model B) : acts like trigger detector + PC apps : acts like command center + Both communicate by USB connection 2. I have a team with another two Больше

$277 USD за 14 дней(-я)
(0 отзывов(-а))