User avatar
darkskyseeker
Posts: 16
Joined: Wed Sep 12, 2018 5:21 pm
Contact: Website

Linux shell script to control pi motor hat

Tue Feb 25, 2020 9:18 pm

If I want to avoid python, are there any commands usable in a linux shell script to control a stepper hat on a pi4?
To be, or not to be! Those are 2 questions.

pcmanbob
Posts: 9033
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Linux shell script to control pi motor hat

Wed Feb 26, 2020 11:08 am

Hi.

I guess that would depend on the motor hat in question and how its controlled if you use python.

You need to give more details about the hat and how its controlled in python then someone may be able to help.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

User avatar
DougieLawson
Posts: 38553
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Linux shell script to control pi motor hat

Wed Feb 26, 2020 11:47 am

darkskyseeker wrote:
Tue Feb 25, 2020 9:18 pm
If I want to avoid python, are there any commands usable in a linux shell script to control a stepper hat on a pi4?
You, wholeheartedly, should avoid python as it's is dead in favour of python3.

Could you explain what your objection to python3 is and where it stems from? Since you get a massive library of python3 code to do exciting things with your stepper hat and avoiding python3 seems to have a certain amount of nose amputation versus face spiting to it (or in other words it's completely illogical).

If you won't use python3 you're going to need to sharpen your C/C++ coding pencil.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

I'll do your homework for you for a suitable fee.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

User avatar
darkskyseeker
Posts: 16
Joined: Wed Sep 12, 2018 5:21 pm
Contact: Website

Re: Linux shell script to control pi motor hat

Fri May 22, 2020 5:38 pm

>> Could you explain what your objection to python3 is and where it stems from?

Just a little resistance to getting sidetracked with another learning curve. But then again, why stop learning?
To be, or not to be! Those are 2 questions.

Heater
Posts: 15516
Joined: Tue Jul 17, 2012 3:02 pm

Re: Linux shell script to control pi motor hat

Sat May 23, 2020 11:19 pm

darkskyseeker wrote:
Fri May 22, 2020 5:38 pm
Just a little resistance to getting sidetracked with another learning curve. But then again, why stop learning?
I sympathize.

Getting on for ten years ago I realized with horror that I had wasted a good junk of my life learning, getting comfortable with and using about a dozen different programming languages and that the majority of them had fallen out of use, e.g. Pascal, Ada, or had become extinct, e.g. ALGOL, Coral, PL/M. I decided this madness had to stop and I promised myself never to waste anymore time learning yet another f'ing programming language (JAFL) just to be able to do the same old stuff but with a different syntax and a whole bunch of different libraries and so on.

That did not last. Turned out I needed Javascript to get what I wanted to do in a browser done. One pretty much needs Python to do anything with machine learning. And now I'm getting into Rust because it's the only language to come along in 40 years that does actually offer significantly new features that no other language has.

I'm afraid it's hopeless. There will always be YAFL coming along to sap your time and mental capacity.
Memory in C++ is a leaky abstraction .

jahboater
Posts: 5492
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: Linux shell script to control pi motor hat

Sat May 23, 2020 11:23 pm

darkskyseeker wrote:
Fri May 22, 2020 5:38 pm
Just a little resistance to getting sidetracked with another learning curve. But then again, why stop learning?
The Raspberry Pi is all about learning, that is its raison d'être.

Love it!
"We are in the beginning of a mass extinction, and all you can talk
about is money and fairy tales of eternal economic growth."
- Greta Thunberg

Return to “Other programming languages”