when I try to make it do something (sudo python gps.py) but it just talks about the directory
I’ve never programmed with the command line, is there a way to adapt this to python? What am I doing wrong? Can you just find directories in the command line?
Can you paste the screenshot of the error that you get and also you have said that you have changed the path to Desktop/GoPiGo/Software/Python/Examples/GPS_Bot/ so after changing to this location, can you type ls on the command line and paste the output with your reply.
You technically could do everything you do in the terminal in python, but it is highly unconventional. It would kinda be like using a Volkswagen INA NASCAR race. If you really want to you can look into the is library for Python. Though it would be harder.
If you typed CD to go into the directory and it gives an error about GPS.py, it most likely means there is no GPS.py. You can also type pwd into the terminal to see what directory your in. Like @Shoban said post in the output of GPS.py would be helpful.
You need to type cd before the file path. So you would type it like this: cd Desktop/GoPiGo/Software/Python/Examples/GPS_Bot/
The cd command switches you to the directory you specify in front of it. Just typing the directory will just produce output on whether it exists or not. I would suggest that you may want to find a quick tutorial on the command line, it’ll make your life much easier!
Could you expand on program in python? And it’s not a stupid question, It’s fine, that’s what the forums are for. I checked and there is indeed a gps.py in Desktop/GoPiGo/Software/Python/Examples/GPS_Bot/ on raspbian for robots. Are you sure youre in that directory when you run sudo python gps.py? You can also type this command to run it from the home directory: sudo python Desktop/GoPiGo/Software/Python/Examples/GPS_Bot/gps.py
It says thats its unable to access that library…
I don’t know
Thanks so much @graykevinb for all the help you’ve been giving me.
I’m just trying to get the GPS sensor to print its coordinates in python whenever its asked. At first I thought I could link the command line to python or something. That was stupid
I’m now just looking for a way to program this on python. I really don’t understand what commands I can use for this sensor. The only sensor I’ve programmed before is the sound sensor which is totally different then this and I can’t find anything online. I was wondering if you could point me towards a tutorial for this for this grove sensor or any tips or how to acess this library on python
You can run terminal commands with os.system("your command") Check out the official wiki by the gps’s manufacturor. Scroll down till you see it talk about using g the raspberry pi and the you go! Have fun! Is that everything then? Feel free to ask more questions if you need to.
Adding on to what @graykevinb has said, we also have a brief explanation on using this sensor here and also a small project on GPS Bot here. You can refer to more of our projects there and let us know your comments.
Could you expand?
Do I put the exact same thing from the command module in python? Is there a certain way? Or do you just not know?
I’m absolutely hopless on the command module, sorry