# How to connect VS Code to PiCar-X via USB (without WiFi)?

**URL:** <https://forum.sunfounder.com/t/how-to-connect-vs-code-to-picar-x-via-usb-without-wifi/3087>\
**Category:** Robotic kit for Raspberry Pi\
**Created:** [April 21, 2025, 10:08am UTC](https://forum.sunfounder.com/t/how-to-connect-vs-code-to-picar-x-via-usb-without-wifi/3087 "2025-04-21T10:08:40Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![BrunoX](https://avatars.discourse-cdn.com/v4/letter/b/c37758/32.png) [@BrunoX](https://forum.sunfounder.com/u/BrunoX)\
**Post date:** [April 21, 2025, 10:08am UTC](https://forum.sunfounder.com/t/how-to-connect-vs-code-to-picar-x-via-usb-without-wifi/3087/1 "2025-04-21T10:08:40Z")

</div>

I need to be able to connect to PiCar-X from VS Code without using WiFi (or Bluetooth) on Windows - preferably via USB.

I’ve searched for any clues in the forum and elsewhere but could not find anything. Must be using wrong keywords or there really isn’t a way.

**Is there a way to turn off WiFi and use USB to connect to PiCar-X from VS Code on Windows?**

---

<div class="post-metadata">

**Author:** ![SunFounder\_Moderator](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@SunFounder\_Moderator](https://forum.sunfounder.com/u/SunFounder_Moderator)\
**Post date:** [April 22, 2025, 9:37am UTC](https://forum.sunfounder.com/t/how-to-connect-vs-code-to-picar-x-via-usb-without-wifi/3087/2 "2025-04-22T09:37:12Z")

</div>

If your Windows PC is connected via Ethernet and the Raspberry Pi is linked to the same network through a router’s hotspot, you can access the Raspberry Pi directly from your PC.

If you don’t have a router, you may consider enabling serial console login on the Raspberry Pi for wired access.

---

<div class="post-metadata">

**Author:** ![BrunoX](https://avatars.discourse-cdn.com/v4/letter/b/c37758/32.png) [@BrunoX](https://forum.sunfounder.com/u/BrunoX)\
**Post date:** [April 22, 2025, 11:19am UTC](https://forum.sunfounder.com/t/how-to-connect-vs-code-to-picar-x-via-usb-without-wifi/3087/3 "2025-04-22T11:19:16Z")

</div>

Thank you.

I need to connect to PiCar-X without a network/router - would the serial console login work for connecting from VS Code?

---

<div class="post-metadata">

**Author:** ![SunFounder\_Moderator](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@SunFounder\_Moderator](https://forum.sunfounder.com/u/SunFounder_Moderator)\
**Post date:** [April 25, 2025, 7:27am UTC](https://forum.sunfounder.com/t/how-to-connect-vs-code-to-picar-x-via-usb-without-wifi/3087/4 "2025-04-25T07:27:38Z")

</div>

This approach may not be feasible. We recommend following our official tutorials for connecting your PiCar-X:

- **Python Control Tutorial** :  
[PiCar-X Python Guide](https://docs.sunfounder.com/projects/picar-x-v20/en/latest/python/play_with_python.html)
- **EZBlock App Control Tutorial** :  
[PiCar-X EZBlock Guide](https://docs.sunfounder.com/projects/picar-x-v20/en/latest/ezblock/play_with_ezblock.html)

These guides will provide you with the proper setup instructions. Let us know if you need any assistance!

---

<div class="post-metadata">

**Author:** ![BrunoX](https://avatars.discourse-cdn.com/v4/letter/b/c37758/32.png) [@BrunoX](https://forum.sunfounder.com/u/BrunoX)\
**Post date:** [April 25, 2025, 12:52pm UTC](https://forum.sunfounder.com/t/how-to-connect-vs-code-to-picar-x-via-usb-without-wifi/3087/5 "2025-04-25T12:52:58Z")

</div>

Thank you.  
I think that using Ethernet cable to directly connect to Rasberry Pi is the option to go - I yet have to try that.  
It will take some time though, I have other stuff with higher priority to do first.

---

<div class="post-metadata">

**Author:** ![Spf650](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@Spf650](https://forum.sunfounder.com/u/Spf650)\
**Post date:** [April 26, 2025, 7:33am UTC](https://forum.sunfounder.com/t/how-to-connect-vs-code-to-picar-x-via-usb-without-wifi/3087/6 "2025-04-26T07:33:38Z")

</div>

Not sure what your final application requirements nor constraints are, but would a usb to ttl serial cable work out for you? Usb on the host and rxd/txd on the hat/pi.

E.g

> **[USB to UART serial console cable](https://shop.pimoroni.com/products/usb-to-uart-serial-console-cable?variant=288389664)**
>
> Want to access your Raspberry Pi from your laptop or computer without needing to hook it up to a screen, find an extra keyboard and mouse, or configure networking? Then this is the thing for you!

 ![20250426_081836~2](https://canada1.discourse-cdn.com/flex029/uploads/sunfounder/original/2X/7/7796d34406aefdc1f835229db9e5ebfc3f1326e3.jpeg)

This would give you serial console access via e.g putty etc

---

<div class="post-metadata">

**Author:** ![BrunoX](https://avatars.discourse-cdn.com/v4/letter/b/c37758/32.png) [@BrunoX](https://forum.sunfounder.com/u/BrunoX)\
**Post date:** [April 26, 2025, 3:17pm UTC](https://forum.sunfounder.com/t/how-to-connect-vs-code-to-picar-x-via-usb-without-wifi/3087/7 "2025-04-26T15:17:05Z")

</div>

Thanks, I don’t think that would work with VS Code … Would it?

---

<div class="post-metadata">

**Author:** ![Spf650](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@Spf650](https://forum.sunfounder.com/u/Spf650)\
**Post date:** [April 26, 2025, 3:42pm UTC](https://forum.sunfounder.com/t/how-to-connect-vs-code-to-picar-x-via-usb-without-wifi/3087/8 "2025-04-26T15:42:30Z")

</div>

Should do, just use VS Code’s Remote - SSH extension, I’ve used this in the past., though not for some time!  
You’ll need to generate a putty key, but plenty of help on google to do this… e.g

Copied from googles AI thingy..

Detailed Steps:

1. **1.**  **Generate or Convert a PuTTY Key:**

- If you don’t have a PuTTY private key, use PuTTYGen to generate one.
- If you have an existing PuTTY key, use PuTTYGen to convert it to the OpenSSH format. Go to “Conversions” \> “Export OpenSSH key” in PuTTYGen.
- Save the converted key to your local machine, preferably in your .ssh directory.

1. **2.**  **Configure VS Code for Remote SSH:**

- Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P) and type “Remote-SSH: Open Configuration File…”.
- Select the SSH config file you want to modify.
- Add a host entry in the config file with the following format:

Code

```auto
     Host your-server-name HostName your-server-ip-or-hostname User your-username IdentityFile ~/.ssh/exported-keyfile-from-putty

```

- Replace `your-server-name`, `your-server-ip-or-hostname`, `your-username`, and `exported-keyfile-from-putty` with your actual values.

1. **Connect to the Remote Host:**

- In VS Code, click the green “Open a remote window” button in the bottom left corner and select “Remote-SSH: Connect to Host…”.
- Choose the host you configured in the SSH config file.
- VS Code will establish the SSH connection, and you’ll be able to edit files and run commands on your remote server.

---

<div class="post-metadata">

**Author:** ![BrunoX](https://avatars.discourse-cdn.com/v4/letter/b/c37758/32.png) [@BrunoX](https://forum.sunfounder.com/u/BrunoX)\
**Post date:** [April 26, 2025, 3:52pm UTC](https://forum.sunfounder.com/t/how-to-connect-vs-code-to-picar-x-via-usb-without-wifi/3087/9 "2025-04-26T15:52:53Z")

</div>

OK, thanks a lot!  
I will try this too.

---

<div class="post-metadata">

**Author:** ![Spf650](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@Spf650](https://forum.sunfounder.com/u/Spf650)\
**Post date:** [April 26, 2025, 4:03pm UTC](https://forum.sunfounder.com/t/how-to-connect-vs-code-to-picar-x-via-usb-without-wifi/3087/10 "2025-04-26T16:03:14Z")

</div>

Good luck! If you use that or similar cable, heed the warning about not connecting the 3v3 power pin.

---

<div class="post-metadata">

**Author:** ![BrunoX](https://avatars.discourse-cdn.com/v4/letter/b/c37758/32.png) [@BrunoX](https://forum.sunfounder.com/u/BrunoX)\
**Post date:** [April 26, 2025, 4:06pm UTC](https://forum.sunfounder.com/t/how-to-connect-vs-code-to-picar-x-via-usb-without-wifi/3087/11 "2025-04-26T16:06:08Z")

</div>

Yes, I have such a cable, thanks!
