Python Forum
Help understanding code section
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help understanding code section
#3
        if event.code == 'ABS_X':
            value = event.state
            if value < -1500:
                if not joints[0].isBusy(): joints[0].run(1, 35)
            elif value > 5000:
                if not joints[0].isBusy(): joints[0].run(0, 35)
            else:
                if not joints[0].isBusy(): joints[0].softStop()

I read the part you refereed me to before posting the first bit but couldn't get it to work.
Is that correct now?

Cant work out how to change the original post
Reply


Messages In This Thread
Help understanding code section - by raz631 - Dec-14-2017, 01:23 AM
RE: Help understanding code section - by Larz60+ - Dec-14-2017, 03:22 AM
RE: Help understanding code section - by raz631 - Dec-14-2017, 03:34 AM
RE: Help understanding code section - by buran - Dec-14-2017, 05:10 AM
RE: Help understanding code section - by raz631 - Dec-14-2017, 09:32 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to add multi-line comment section? Winfried 1 247 Mar-24-2024, 04:34 PM
Last Post: deanhystad
  Code understanding: Need help in understanding dictionary code jt123 0 493 Jul-09-2023, 01:13 PM
Last Post: jt123
  New to python/coding Need help on Understanding why this code isn't working. Thanks! mat3372 8 1,813 May-09-2023, 08:47 AM
Last Post: buran
  Append data to Yaml section tbaror 0 7,063 Feb-09-2022, 06:56 PM
Last Post: tbaror
  Understanding a piece of code Michael1 4 1,463 Jan-20-2022, 07:14 PM
Last Post: Michael1
  Beginner: I need help understanding few lines of a code. hop_090 1 1,722 Sep-07-2020, 04:02 PM
Last Post: Larz60+
  Extracting Rows From Data Frame and Understanding The Code JoeDainton123 0 1,463 Aug-03-2020, 04:08 PM
Last Post: JoeDainton123
  Create an isolated section in bash? yxk 1 1,982 Feb-27-2020, 11:16 AM
Last Post: Larz60+
  Help Understanding Code Variables 1 1,938 May-02-2019, 05:53 PM
Last Post: micseydel
  Best section to do a while loop in my code mrapple2020 0 1,668 Apr-15-2019, 01:14 AM
Last Post: mrapple2020

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020