GPS sensor gopigo from command line

sorry, meant ls
1’s look similar.

thats with 1’s

Sorry. I meant to say type ls into the terminal.

I said 1s looks similar to ls

Type ls

as in a L and a S

OOOH

sorry

Ok. So it is there just as I suspected. What this means is that you’ll need to type sudo su -
into the terminal. This will log you into root. Now type cd .. Then type cd/home/pi/
Now run chown pi gps_data.csv then chmod +r gps_data.csv and finally chmod +w gps_data.csv

No need to type sudo because you are logged into root. Meaning you can do whatever you want there. Also be careful, you literally can do whatever you want there! Also remember to type logout into the terminal after your all done with those commands. This will put you back in your normal user.

Sorry if I make everything complex. :slight_smile:

thanks so much and I’m sorry this is taking so much time. I would be so lost without you thanks :smiley: but when I get to the root@dex it tells me that it doesn’t
exist?

Its OK.

AHA! Got the problem.

This time run sudo su - but instead of typing all the cd commands just go straight to running the chmod and chown commands. For your convience the exact commands are:
sudo su -
chown pi gps_data.csv
chmod +r gps_data.csv
chmod +w gps_data.csv

When you did sudo su - I assumed you were doing it outside the directory. Just type the above commands and I am 100% sure, yes 100% sure it will run perfectly!

Thank you for being patient. It’s hard to remotely explain this stuff.


No thank you for being patient! You have nothing to gain by helping my but you do anyway THANK YOU!!
But now its still not working… I must have done something stupid I do that a lot :blush:
If its too hard to explain you could send a screenshot of you doing it i dont know
Thanks again and sorry it didint work

Sigh.

After typing sudo su - can you type pwd into the terminal?
That will show what directory you are in. If it shows you not in the gps folder then navigate to it with these commands:
cd ..
cd home/pi/Desktop/GoPiGo/Software/Python/Examples/GPS_Bot/ Then run the chown and chmod commands which I’m guessing you know bye now! lol. :slight_smile:

sorry for doing something stupid again probably
Its still unable to read sudo pythin gps.py and python still returns the same mistake

Wow. I’m stumped. Sorry for put you through all that trouble.

We could do this the easy way.

If you download GPS.py from github it should work. DexterInd puts their code on github


You see Raspbian For Robots is obviously blocking it. If you download and run that file you have full access to it. That definitely should work.

Why didn’t I think of this before?

Sorry, you made no mistakes on e last commands you did. Sorry, shouldn’t be this hard.

@karan you have any ideas? You wrote the code.

No need to apologize and thanks so much for your continued help @graykevinb

I clicked the link and it talked about the terms and everything but no mention of anything to download so where can I download it?

Also why does the GPS hardware test work and not the other folders?
Thanks

If you just want that file copy and paste the code. Otherwise you’ll have to click clone in the repository.

And what do you mean other folders aren’t working?

Thats the python code that kept telling me that permission denied for gps_data.csv. The command module just told me that it could not read gps.py

exactly, the operating system is blocking you. However if you download the code onto your pi. “You” own the code and should get no permission denied stuff.

Ok thanks @graykevinb how can I do that? what link do i press

Go to the page here. and copy and paste the program. Or go to the link here. and click clone to download the entire repository.

if i download it how do i use it afterwards?

Run python3 filename of program in the terminal.