I bought the pH Meter 2.2 and consumer grade probe from Scientific Atlantic. I somehow missed that it cannot be directly connected to a Pi. So, I installed it on an Arduino, and hooked the Arduino to the Pi by USB.
My problem is that I cannot get Mycodo (running on the Pi) to see the data. I can run a simple program on the Pi and see the data in real time, but I must be missing something about the transfer.
I have tried to search for an infinite number of combinations of these words, but I have not found this exact setup.
How I’ve communicated between microcontrollers and Pis is via Serial, over USB. Listen for a command on the arduino, such as the letter “r”, then once it’s received, return a measurement value. On the Pi, the Input merely writes “r” to the USB device (arduino), then listens for a response. If something is received, attempt to parse the returned string into a numerical value.
If you’re already returning values, all you need is to use the Python 3 Command Input. This lets you use Python code to retrieve the value, which you already have the code for.