adeept / adeept_alter

A open source robot based on Raspberry Pi
MIT License
2 stars 1 forks source link

The python script to start the robot does not work. #2

Open anonymousm3 opened 3 years ago

anonymousm3 commented 3 years ago

I was trying to run this code

pi@raspberrypi:~ $ cd adeept_alter/server pi@raspberrypi:~/adeept_alter/server $ sudo python3 webServer.py

but it gives me an error

" Traceback (most recent call last): File "webServer.py", line 19, in import app File "/home/pi/adeept_alter/server/app.py", line 8, in from camera_opencv import Camera File "/home/pi/adeept_alter/server/camera_opencv.py", line 6, in import alterMove File "/home/pi/adeept_alter/server/alterMove.py", line 7, in import oledCtrl File "/home/pi/adeept_alter/server/oledCtrl.py", line 24, in disp.begin() File "/usr/local/lib/python3.7/dist-packages/Adafruit_SSD1306/SSD1306.py", line 148, in begin self._initialize() File "/usr/local/lib/python3.7/dist-packages/Adafruit_SSD1306/SSD1306.py", line 247, in _initialize self.command(SSD1306_DISPLAYOFF) # 0xAE File "/usr/local/lib/python3.7/dist-packages/Adafruit_SSD1306/SSD1306.py", line 129, in command self._i2c.write8(control, c) File "/usr/local/lib/python3.7/dist-packages/Adafruit_GPIO/I2C.py", line 114, in write8 self._bus.write_byte_data(self._address, register, value) File "/usr/local/lib/python3.7/dist-packages/Adafruit_PureIO/smbus.py", line 327, in write_byte_data self._device.write(data) OSError: [Errno 121] Remote I/O error"

pi@raspberrypi:~/adeept_alter/server $

anonymousm3 commented 3 years ago

When i tried to run the code "vcgencmd get_camera" the response was OK and good

pi@raspberrypi:~/adeept_alter/server $ vcgencmd get_camera supported=1 detected=1 pi@raspberrypi:~/adeept_alter/server $

Also I tried to run the code "raspistill -o testshot.jpg" it works and it flashes a camera or snapshot as to where the camera is looking at..

anonymousm3 commented 3 years ago

I also have another robot which is from adeept as well and to be honest i bought a lot of it and I tried the other camera from the other robot and still the error shows. But when i try the camera of the alter to the other robot it is working pretty good.. So that means it was really the code that didnt work here..

adeept commented 3 years ago

Please check whether the OLED module and MPU6050 module are installed correctly.

Check the I2C address. Enter in the Raspberry Pi command line: i2cdetect -y 1 After installing the OLED module and MPU6050 module, there are “40, 70,3c,68” addresses in the running result.

anonymousm3 commented 3 years ago

but based on the Tutorial together with the rar file downloaded from https://adeept.com/learn, you can run the program just by using raspberry pi, raspberry pi camera and robot hat. Please do check tutorial under 1.9 Running the program of the Raspberry Pi robot