Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOError: [Errno 2] No such file or directory #30

Open
neilyoung opened this issue Jan 21, 2018 · 0 comments
Open

IOError: [Errno 2] No such file or directory #30

neilyoung opened this issue Jan 21, 2018 · 0 comments

Comments

@neilyoung
Copy link

While running

sudo python cali_server.py on a Pi3

I'm getting this:

pi@raspberrypi:~/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/server $ sudo python cali_server.py 
offset_x = 11
offset_y = 0
offset = 0
turning0 = True
turning1 = True
Traceback (most recent call last):
  File "cali_server.py", line 176, in <module>
    setup()
  File "cali_server.py", line 47, in setup
    video_dir.setup(busnum=busnum)
  File "/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/server/video_dir.py", line 34, in setup
    pwm = servo.PWM(bus_number=busnum) # Initialize the servo controller.
  File "/home/pi/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi/server/PCA9685.py", line 113, in __init__
    self.bus = smbus.SMBus(self.bus_number)
IOError: [Errno 2] No such file or directory

i2cHelper gives:

pi@raspberrypi:~/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi $ sudo python i2cHelper.py

   ====================================
   ||                                ||
   ||     Raspberry Pi I2C check     ||
   ||        and setup tools         ||
   ||                                ||
   ||                     SunFounder ||
   ====================================

   Checking your Pi's information.
Traceback (most recent call last):
  File "i2cHelper.py", line 148, in <module>
    main()
  File "i2cHelper.py", line 89, in main
    you_i2c_bus_number = getPiI2CBusNumber()
  File "i2cHelper.py", line 45, in getPiI2CBusNumber
    raise ValueError("Error occur while getting Pi Revision. Revision:{0}".format(revision))
ValueError: Error occur while getting Pi Revision. Revision:2a02082
pi@raspberrypi:~/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi $ 

I added my revision to i2Chelper.py

RPI_REVISION_3 = ["a02082", "a22082", "2a02082"]

Result:

pi@raspberrypi:~/Sunfounder_Smart_Video_Car_Kit_for_RaspberryPi $ sudo python i2cHelper.py

   ====================================
   ||                                ||
   ||     Raspberry Pi I2C check     ||
   ||        and setup tools         ||
   ||                                ||
   ||                     SunFounder ||
   ====================================

   Checking your Pi's information.
   Your cpu revision: 2a02082
   Your Raspberry Pi is Revision 3
   Your I2C bus number is: 1

   Checking your device...
   I2C has not been setup.

   Backup... done
   Setting i2c... done
   I2C has set. It would change after reboot.
   Do you want to reboot now?(y/n) y
   Your Raspberry Pi will be reboot in 5 second.
    5
    4
    3
    2
    1
    0
   Rebooting...

Maybe you fix that too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant