Hi there! I need an app that will run on a Raspberry Pi Zero. It needs to communicate with a USB device that streams data over a standard serial port interface at 115200 bps, and a standard 10-button USB controller in the following sequence:
0. Autostart the app when the device is powered on.
1. Wait for a physical pushbutton #1 attached to a GPIO to be pressed.
2. Open a serial port on the attached device at the speed of 115200.
3. Save the serial output to a text file until the word "END" is received.
4. Compare the saved file with the master file stored in a local folder (let's say, "/documents/[url removed, login to view]")
5. If the files match, signal a green LED (LED #1) attached to a GPIO pin.
6. If the files mismatch, signal a red LED (LED #2) attached to a GPIO pin.
7. Wait for the user to press the physical pushbutton #2 attached to a GPIO pin.
8. Query the USB gamepad for the pressed buttons (UP, DOWN, LEFT, RIGHT, A, B, START, SELECT, LSHIFT, RSHIFT).
9. If the button UP is pressed, light up an LED #3 at a GPIO pin. If released, turn the LED off.
10. If the button DOWN is pressed, light up an LED #4 at a GPIO pin. If released, turn the LED off.
11. If a physical pushbutton #1 is pressed at any moment, return to Step 1.
12. If a physical pushbutton #2 is pressed at any moment, go to Step 8.
Overall, there are expected to be two USB downstream devices: Serial port and USB gamepad. 2 physical pushbuttons. 10 + 2 LEDs (1 for each button on the gamepad, 2 to signal Serial comm status).
Hello I can do this project. I only have Raspberry Pi3. I think this should not matter actually. What is the USB->serial adapter? FTDI? Best regards, Denis Poduzov