I am currently trying to build a small pressure sensor using Velostat and Arduino Nano. I have connected the crocodile pins to GND and to A0 analog pin. The conductive loop tutorial is followed is here
void setup() {
// initialize serial communications at 9600 bps:
Serial.begin(9600);
pinMode(9, INPUT_PULLUP); //****
strip.begin();
strip.show(); // Initialize all pixels to 'off'
}
Note that the internal pullup is enabled on the analog input (pin 9 on the Flora).
Velostat pressure sensor (described in the next step) connected to GND and pad marked D9 (this pin is also A9, and we will be using it as an analog input).
This may not apply, directly, to the Nano. The point is that the analog input has the internal pullup enabled.
The reason is that the velostat is a resistor. In order to measure resistance you need the unknown resistor (velostat) to be one leg of a resistor voltage divider. The other leg of the voltage divider is the internal pullup. Measuring resistance.
Since you are using a n Arduino Nano and not an Adafruit Flora you will need to provide a pull-up some other way (I think analogRead() disables the pull-up resistors on the analog inputs.) You can set Pin 9 to INPUT_PULLUP and wire it to A0 (along with the wire from the Velostat). Or you could use a fixed resistor (10,000 Ohms, maybe) between A0 (along with the wire from the Velostat) and +5V.
If the pin is configured as an INPUT, digitalWrite() will enable (HIGH) or disable (LOW) the internal pull-up on the input pin. It is recommended to set the pinMode() to INPUT_PULLUP to enable the internal pull-up resistor. See the digital pins tutorial for more information.
So now It works as expected. However I have a new problem which I have posted in the "programming questions ", the new problem gist is of using pins to establish a SERIAL_UART connection between raspberry pi3 b+ and Arduino and sending these values to the raspberry pi 3 b+.