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
  i want to shorten a working section pizzakafz 15 2,855 Aug-23-2024, 11:56 AM
Last Post: deanhystad
  How to add multi-line comment section? Winfried 2 1,395 Jun-04-2024, 07:24 AM
Last Post: Gribouillis
  Code understanding: Need help in understanding dictionary code jt123 0 959 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 3,583 May-09-2023, 08:47 AM
Last Post: buran
  Append data to Yaml section tbaror 0 8,846 Feb-09-2022, 06:56 PM
Last Post: tbaror
  Understanding a piece of code Michael1 4 2,422 Jan-20-2022, 07:14 PM
Last Post: Michael1
  Beginner: I need help understanding few lines of a code. hop_090 1 2,253 Sep-07-2020, 04:02 PM
Last Post: Larz60+
  Extracting Rows From Data Frame and Understanding The Code JoeDainton123 0 1,921 Aug-03-2020, 04:08 PM
Last Post: JoeDainton123
  Create an isolated section in bash? yxk 1 2,599 Feb-27-2020, 11:16 AM
Last Post: Larz60+
  Help Understanding Code Variables 1 2,495 May-02-2019, 05:53 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

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