# PC to Bluetooth (with Arduino) does not work when USB is unplugged

**URL:** https://discourse.processing.org/t/pc-to-bluetooth-with-arduino-does-not-work-when-usb-is-unplugged/42156
**Category:** Electronics (Arduino, etc.)
**Created:** [June 6, 2023, 2:23pm UTC](https://discourse.processing.org/t/pc-to-bluetooth-with-arduino-does-not-work-when-usb-is-unplugged/42156 "2023-06-06T14:23:20Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![RichardDL](https://avatars.discourse-cdn.com/v4/letter/r/f475e1/32.png) [@RichardDL](https://discourse.processing.org/u/RichardDL)
#### Post date: [June 6, 2023, 8:20pm UTC](https://discourse.processing.org/t/pc-to-bluetooth-with-arduino-does-not-work-when-usb-is-unplugged/42156/5 "2023-06-06T20:20:17Z")

</div>

Hi @Myrdalm, In your Processing sketch you are connecting to ‘Serial.List()[0]’ Are you sure that’s the BT com port? What’s in that list is going to change when you add/remove the Arduino. I think it’s more reliable to put the name of the port there hard coded as e.g. “COM4”. I hope you’re looking at the available ports in device manager to check what each one is.

If the BT software/hardware on the PC is not working well, please see the comments here about using a [USB-TTL-HC05](https://discourse.processing.org/t/accessing-ble-input-to-processing/35560/2) as an alternative.

In your Arduino code, I don’t think you should have pinMode settings on the SoftwareSerial pins. That’s not done in the given [example](https://docs.arduino.cc/tutorials/communication/SoftwareSerialExample).

Please edit your first post, select the Processing code and press control-e. This will format it nicely and make it easier for anyone to copy and test. Repeat for Ard code.

🙂

---

_[View the full topic](https://discourse.processing.org/t/pc-to-bluetooth-with-arduino-does-not-work-when-usb-is-unplugged/42156)._
