I want to use a 4-wire touchscreen with daisy seeding to manage parameters on Plug Data.
I previously connected it to an Arduino Uno (with 4 analog inputs) by inserting this code into the Arduino IDE. What should I write in JSON to achieve the same result? (i.e., read the x- and y-axis values).
What kind of device is this? how does it communicate?
If it’s just about reading analog pins then you do the same thing as for a knob or other analog input.
See the component reference for more: Custom JSON | hvcc
If it’s an analog sensor then you can set up the json file similar to how it’s done in this guide: Quick Guide on Setting Up a Custom JSON File for pd2dsy & Oopsy!
And just wanted to double check that you were you able to get it working with Arduino Uno. If so, how did you connect the wires to it?
In Arduino Uno I connected all 4 wires to analog inputs (A0, A1, A2, A3)
The problem is that all four wires are analog pins; the microcontroller must change their function during the coordinate measurement process. To measure the X coordinates, the microcontroller would set X+ and X- as digital outputs (5V on X+ and GND on X-) and measure the voltage on Y+ and Y- using analog inputs.
Conversely, to find the Y-axis coordinates, I would need to write a json file that allows me to do this, as I did in the Arduino IDE, but I’m not capable of doing so.
I don’t see how a json would do this. The json is a static configuration of pins and functionality.
Ideally for this to be usable libDaisy gets support for such input devices and from the PD/Heavy wrapper you can then receive x and y coordinates (for instance as a pair).
It might be possible to configure a very special type of component for this, but I don’t really see how this would work in our setup.

