# About dependence of username on picar-4wd program

**URL:** <https://forum.sunfounder.com/t/about-dependence-of-username-on-picar-4wd-program/250>\
**Category:** Robotic kit for Raspberry Pi\
**Created:** [April 28, 2023, 11:37pm UTC](https://forum.sunfounder.com/t/about-dependence-of-username-on-picar-4wd-program/250 "2023-04-28T23:37:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dododo](https://avatars.discourse-cdn.com/v4/letter/d/67e7ee/32.png) [@dododo](https://forum.sunfounder.com/u/dododo)\
**Post date:** [April 28, 2023, 11:37pm UTC](https://forum.sunfounder.com/t/about-dependence-of-username-on-picar-4wd-program/250/1 "2023-04-28T23:37:19Z")

</div>

# Hello. I tried control of picar-4wd with ubuntu on raspi4. “picar-4wd test motor” shows following error:

error: [Errno 2] No such file or directory: ‘/home/pi/.picar-4wd/config’  
error: [Errno 2] No such file or directory: ‘/home/pi/.picar-4wd/config’  
error: [Errno 2] No such file or directory: ‘/home/pi/.picar-4wd/config’  
error: [Errno 2] No such file or directory: ‘/home/pi/.picar-4wd/config’  
error: [Errno 2] No such file or directory: ‘/home/pi/.picar-4wd/config’  
Traceback (most recent call last):  
File “/usr/local/lib/python3.8/dist-packages/picar\_4wd-0.0.1-py3.8.egg/picar\_4wd/i2c.py”, line 17, in wrapper  
return func(\*args, \*\*kw)  
File “/usr/local/lib/python3.8/dist-packages/picar\_4wd-0.0.1-py3.8.egg/picar\_4wd/i2c.py”, line 37, in \_i2c\_write\_word\_data  
return self.\_smbus.write\_word\_data(addr, reg, data)  
OSError: [Errno 121] Remote I/O error

===================================================

This raspi’s username is ubuntu.  
Maybe it is the reason.

However, can I perform the picar program without changing of username?

---

<div class="post-metadata">

**Author:** ![dododo](https://avatars.discourse-cdn.com/v4/letter/d/67e7ee/32.png) [@dododo](https://forum.sunfounder.com/u/dododo)\
**Post date:** [April 30, 2023, 3:08am UTC](https://forum.sunfounder.com/t/about-dependence-of-username-on-picar-4wd-program/250/2 "2023-04-30T03:08:18Z")

</div>

In case of “pi” perform “picar-4wd test motor”, “OSError: [Errno 121] Remote I/O error” appear.

I2C is enable with “sudo raspi-config”.  
But, no response by i2cdetect -y 1.  
0 1 2 3 4 5 6 7 8 9 a b c d e f  
00: – – – – – – – – – – – – –  
10: – – – – – – – – – – – – – – – –  
20: – – – – – – – – – – – – – – – –  
30: – – – – – – – – – – – – – – – –  
40: – – – – – – – – – – – – – – – –  
50: – – – – – – – – – – – – – – – –  
60: – – – – – – – – – – – – – – – –  
70: – – – – – – – –

Is the hardware malfunctioning?

---

<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:** [May 4, 2023, 6:55am UTC](https://forum.sunfounder.com/t/about-dependence-of-username-on-picar-4wd-program/250/3 "2023-05-04T06:55:46Z")

</div>

1. Yes, the default user name on our tutorial is pi, so the path is also the default pi.  
If your username is not pi, just change the path, for example:  
cd /home/pi/picar-4wd/ #default username: pi  
Modify it to  
cd /home/ubuntu/picar-4wd/ #username: ubuntu  
That’s it!
2. Due to the long test time, you can also use an external power supply to power the Raspberry Pi at the same time. However, 4WD-Hat can only be powered by battery, you cannot use external power directly without battery, otherwise the following error will occur when running the command: picar-4wd test motor.

---- picar-4wd test motor return OSError: [Errno 121] Remote I/O error ----  
a.Please make sure you connect the battery to robot hat.  
b. Is the battery level sufficient.  
Execute picar-4wd power-read to get the power voltage.  
c.Execute picar-4wd soft-reset command to reset the controller.

---

<div class="post-metadata">

**Author:** ![dododo](https://avatars.discourse-cdn.com/v4/letter/d/67e7ee/32.png) [@dododo](https://forum.sunfounder.com/u/dododo)\
**Post date:** [May 20, 2023, 11:47am UTC](https://forum.sunfounder.com/t/about-dependence-of-username-on-picar-4wd-program/250/4 "2023-05-20T11:47:28Z")

</div>

Thank you for your reply.

I changed pi to ubuntu in setup.py. And I executed the setup.py.  
4WD-Hat gets power from 18650 batteries. And a power switch on the hat was ON.  
Then, I tried to execute a program /home/ubuntu/picar-4wd/examples/keyboard\_control.py  
However, I got following error in import statement of picar-4wd.  
Could I please ask for advice.

* * *

Traceback (most recent call last):  
File “/usr/local/lib/python3.8/dist-packages/picar\_4wd-0.0.1-py3.8.egg/picar\_4wd/i2c.py”, line 17, in wrapper  
return func(\*args, \*\*kw)  
File “/usr/local/lib/python3.8/dist-packages/picar\_4wd-0.0.1-py3.8.egg/picar\_4wd/i2c.py”, line 37, in \_i2c\_write\_word\_data  
return self.\_smbus.write\_word\_data(addr, reg, data)  
OSError: [Errno 121] Remote I/O error

---

<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:** [May 22, 2023, 3:45am UTC](https://forum.sunfounder.com/t/about-dependence-of-username-on-picar-4wd-program/250/5 "2023-05-22T03:45:33Z")

</div>

1. You execute sudo raspi-config ,check whether i2c service is enabled or not, if not, please enable it.  
If it is enabled or it still reports an error, please execute i2cdetect -y 1 to see if the i2c service port signal is recognized. (Please provide screenshot)
2. If you have a spare Raspberry Pi, please replace the Raspberry Pi and go to execute the code again to see if the same error will occur.  
If the above methods are tried more than once, still the i2c error will appear, maybe the robot hat is damaged, you need to replace the robot hat with a new one.
