Skip to content
Snippets Groups Projects
Commit 43761a4e authored by kaijunge's avatar kaijunge
Browse files

updated readme

parent dd4a4ba0
No related branches found
No related tags found
No related merge requests found
# Arduino_python_communication # Arduino_python_communication
## Python libraries you need to pre-install
[pyserial](https://gitlab.epfl.ch/create-lab/lab-systems/arduino_python_communication)
[pynput](https://pypi.org/project/pynput/)
## How to use this tool
### Initial setup (python side)
On your python file, you need to import everything from the `comms_wrapper.py` file. This can be done by `from PATH TO FILE import *`, or in a more hacky way, copying the file to your directory of your python file and with the command `from comms_wrapper import *`.
The way to use the functions are currently most easilly followed by looking at the example in `comms_wrapper_example.py`.
### Initial setup (arduino side)
Unfortunatley the way this is currently designed is to have `pyCommsLib.cpp` and `pyCommsLib.h` inside the *same folder* as your arduino .ino file. These two files can be found under `pyComms/`.
Once you have the two files, when you open your main .ino file through the arduino ide, you should see two new tabs with the .cpp and .h files. This mean you have included the files correctly.
On the main .ino file, you can simply write `#include "pyCommsLib.h` at the top which will make the functions available. There are variables you will need to define and specific ways to call the send/recive functions but this is currently most easily followed by looking at the example in `pyComms/pyComms.ino`.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment