diddyJoy error and diddyWeb question

Hello,

First of all, does the diddyWeb script absolutely need the camera in order for it to work?

Second, I'm getting some kind of error when trying to run the diddyJoy script:


Traceback (most recent call last)
File "diddyJoy.py", line 109, in < module >
events = pygame.event.get( )
pygame.error: video system not initialized

Did I miss something?

Some info: I got this running on the Pi 3, got an official ps3 controller tethered via built-in bluetooth and diddySequence.py works flawlessly.

I'll keep recording my findings since it might be of help later on.

I have continued to try to fix this by going to this link (https://www.piborg.org/joyborg) and following the instructions there but hitting another roadblock once running the following:

gksudo ~/JoyBorg.py

I get the following error:
gtk-WARNING **: cannot open display:

Ok I figured it out. The solution is to NOT try to run those commands via ssh. You absolutely need to run them with a monitor attached to the pi.

Hope this helps anyone that comes across the same issue.

piborg's picture

The DiddyBorg Web UI can be used without the camera, but it requires altering the script a bit.
See this post for the altered version: https://www.piborg.org/node/1849

The SSH issue with pygame has been a pain for us, there is a particular line in the script which some poeple need to make it work, others have problems with the line included.

The line in qestion is highlighted here:

# Setup pygame and wait for the joystick to become available
PBR.MotorsOff()
os.environ["SDL_VIDEODRIVER"] = "dummy" # Removes the need to have a GUI window
pygame.init()
#pygame.display.set_mode((1,1))
print 'Waiting for joystick... (press CTRL+C to abort)'
while True:

Try removing the comment symbol (#) from the start of the line and see if the diddyJoy script runs correctly from SSH.

On a side note gksudo is not requried for any of the PicoBorg Reverse or DiddyBorg scripts, if anything it will cause more problems.

Still getting errors but now with the line uncommented. I suppose I really do need to do it without SSH. Bummer.

Traceback (most recent call last):
  File "diddyJoy.py", line 67, in 
    pygame.display.set_mode((1,1))
pygame.error: Unable to open a console terminal

I also downloaded the commented/edited camera text file you linked and it works as long as you sudo :)

Nevermind. I had to run sudo there too.

Everything works well, thanks!

Subscribe to Comments for &quot;diddyJoy error and diddyWeb question&quot;