We needed to add the code for the Arduino to work in processing with the capacitive sensor. For this to work, we had to import the arduino library into processing, this was done at the very top of the sketch.
Also outside the sketch, we had to declare the integers for the arduino.
The serial myPort is a function, and the code for the function is written outside the setup and the draw at the bottom of the sketch.
The sensInput had to be declared and set at zero.
Included in the setup we used this code, and the number  could change, and the number is found in the bottom of the sketch, the number could be different depending on which port was used.
The delay in the code was commented out in order to allow for the capacitive sensor to affect the delay of the tweets/images instead. This was done by creating a float, and using the map to change the numbers to represent another set of numbers that would match the readings from the capacitive sensor.
In order to get the map readings to know the values we wanted to mirror, we had to open the code in Arduino and run the serial monitor to display the readings in numbers of the currents passing through the sensor. As it changed each time depending on the set up, we will have to change and test the numbers prior to the assessment day as the values could change once we are in the room and set up.
As the first value had to be more than one to accurately represent the readings, and error code appeared stating the value was negative. In order to fix this, we created a new float to constrain the values so that they couldn’t go past the numbers. The newInput had to then be changed from sensInput to the constrain. The numbers in constrain had to match the numbers in map in order for it to run correctly.