laurensvalk / segway

Code for robots balancing on two wheels, made with various robotics platforms.
MIT License
42 stars 22 forks source link

Issue testing the segway.py file #7

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hi,

i'm new to ev3 gyroboy - mindstorm and i was trying to use the code in this link:

https://github.com/laurensvalk/segway/tree/master/ev3/ev3dev/python

to test it and see how it works. but i keep getting multiple errors:

1- permission denied = changed the permission to 777 2- text file busy = ??

i also created the file makelinks.sh but still can't test the code.

Thanks

laurensvalk commented 7 years ago

First, transfer "makelinks.sh" and "segway.py" to your EV3, and put them in the same directory. To turn them into executable scripts, run:

chmod +x makelinks.sh
chmod +x segway.py

Now you can run the program:

./segway.py

hold segway up right with its resting wheels on the ground and wait for the program to start.

ghost commented 7 years ago

i'm still getting this error:

-bash: ./segway.py: /usr/bin/env: bad interpreter: Text file busy

laurensvalk commented 7 years ago

Can you retry it after you restart the brick?

Also, can you run only

./makelinks.sh
ls -al

and give the output?

ghost commented 7 years ago

i managed to get it to run and work properly using sudo ./segway.py probably it needed admin access to force it to work.

Thanks

laurensvalk commented 7 years ago

It shouldn't require that, though --- perhaps because something else was also accessing the file, from your previous attempts. Perhaps after a restart it shouldn't need that.