Transistor PNP

I’d like to use a transistor PNP like a reverse switch, so when i cut the blue cable in the picture i want to turn on the current in pin 8 of Arduino… i think i made a wrong circuit in the picture… this is the datasheet of the transistor(mine is bc557)… can you show me the correct circuit? thanks a lot

Something like these.

Igor16:
. . . . . i want to turn on the current in pin 8 of Arduino...

Virtually no current goes into pin 8.

To detect whether the blue wire is cut, connect the blue wire directly from pin 8 to ground (GND). There is no need for a transistor. In your Arduino code use pinMode(INPUT_PULLUP) to enable a pull-up resistor within the Arduino's microcontroller chip. The blue wire connected to ground will keep the input at a 'low' logic level, but when it is cut the pull-up resistor will make the input go to a 'high' logic level.

i want to use this pnp transistor because i've seen that arduino always reads immediately from low to high, but from high to low sometimes it takes 3-4 seconds.. i can't understand why you put the resistors in that scheme, can you tell me why? thank you all

Igor16:
i want to use this pnp transistor because i've seen that arduino always reads immediately from low to high, but from high to low sometimes it takes 3-4 seconds.. i can't understand why you put the resistors in that scheme, can you tell me why? thank you all

High to low and low to high can both be detected immediately by the Arduino.

If they're not, you're doing something wrong - probably you're just disconnecting the wire from the pin, but have not put in a pullup or pulldown resistor to ensure that it goes high or low when not connected to anything. As noted above, if you're connecting the pin to ground, you can use the internal pullup to ensure that it reads high unless it's connected to ground.

Tell us WHY you think you need a transistor.
Leo..

with the pullup it works very well!!! thank you all