element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
element14 presents
  • Challenges & Projects
  • More
element14 presents
element14 presents Forum How should my runners run??
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join element14 presents to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 17 replies
  • Subscribers 108 subscribers
  • Views 1351 views
  • Users 0 members are here
  • strava
  • element14 presents
  • arduino
Related

How should my runners run??

lorrainbow
lorrainbow over 2 years ago

My next element14 presents video uses an arduino to move runners along a track, according to their strava data. The first runner to reach 100km wins!

There's a short video on my twitter: 

And runner 1 takes it!!
This project uses an @arduino WiFi to download @Strava data from 4 friends. It moves them along a track depending on how far they've run. I need to seal the box and decorate the track before it's ready for @E14Community #element14presents pic.twitter.com/koLAfJV7eM

— Lorraine Underwood (@LMcUnderwood) May 6, 2023

The questions I have for my lovely element14 community is how should I move the runners?

At the moment they're running all of their kilometres at once, one at a time. e.g. runner1 runs their total 50km, runner2 runs their total 75km, etc.

We could make them all run at once. 

We could make them run each run at a time, e.g. runner1 runs their first run 5km, runner2 runs their first run 10km and so on and then loop back to runner1 and their 2nd run. OR finally all runners run run1, then all runners run run2, etc. 

EDIT: To clarify, it's not a live track. There's a button and when it's pressed all the runners reverse to the start line then start running. Otherwise I'd miss my runner moving!

  • Sign in to reply
  • Cancel
Parents
  • Mikeatencio
    Mikeatencio over 1 year ago

    I want to build the horse race derby. Can you build one of those? No Strava or anything. An eight horse game.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • beacon_dave
    beacon_dave over 1 year ago in reply to Mikeatencio

    That would likely depend upon which version of the game you are referring to, which of the original features you want to retain and how it is to be presented.

    At a basic level, in order to get an eight horse game, you would just need to double up the number of running tracks to eight, replace the runners with horses and then replace the Strava API based code with new code for the chosen user interface and game logic.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Mikeatencio
    Mikeatencio over 1 year ago in reply to beacon_dave

    I'm printing the 3D parts right now. I'm not sure what to keep and what to delete in the code. I'm not much of a coder, and deleting the wrong things is a little intimidating. I wish they would have commented on what parts of the code go to what. That would have made it easier to figure out.

    For simple operation, I'd be happy to hit a button to cue up the horses, touch it again, and it randomly makes each horse move at its own speed. No one knows which one will win. Hit the button again, and the horses return to the start.

    That being said, would I need two 4-motor driver shields or just one? How many horses can run on that motorboard at a time? And is it expandable if I want more? I would like to think it can run up to 12 horses at a time for reunions.   These are the questions I have. Thanks for the reply. I didn't think anyone would answer.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • beacon_dave
    beacon_dave over 1 year ago in reply to Mikeatencio

    That motor board supports up to four motors at one time.

    You could add another board to get eight motors but you will need enough GPIO for this. Note that the speed control requires a GPIO pin that can provide PWM and you may not have enough on some microcontrollers.

    If you are planning on scaling up, then you might find that the Mega is a more suitable board as it has more PWM pins.
       https://www.arduino.cc/reference/en/language/functions/analog-io/analogwrite/

    If you don't need to drive all eight motors at the same time, then you could also look at switching the output of the motor board to drive different groups of four motors.

    If you look at the Wiki page here:
       https://wiki.dfrobot.com/Quad_Motor_Driver_Shield_for_Arduino_SKU_DRI0039
    you will find some example code to do the basic motor control with that board.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • beacon_dave
    beacon_dave over 1 year ago in reply to Mikeatencio

    That motor board supports up to four motors at one time.

    You could add another board to get eight motors but you will need enough GPIO for this. Note that the speed control requires a GPIO pin that can provide PWM and you may not have enough on some microcontrollers.

    If you are planning on scaling up, then you might find that the Mega is a more suitable board as it has more PWM pins.
       https://www.arduino.cc/reference/en/language/functions/analog-io/analogwrite/

    If you don't need to drive all eight motors at the same time, then you could also look at switching the output of the motor board to drive different groups of four motors.

    If you look at the Wiki page here:
       https://wiki.dfrobot.com/Quad_Motor_Driver_Shield_for_Arduino_SKU_DRI0039
    you will find some example code to do the basic motor control with that board.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • Mikeatencio
    Mikeatencio over 1 year ago in reply to beacon_dave

    I agree, the bigger board might be the way to go. Arduino Mega 2560 is the one I'm considering for future upgrading.

    image versus  image

    The motors have the drive transmission on them and they have a cable input as well. Can I use the standard motor and transmission without the cable inputs? The suggested motors aren't in stock. I have motors with the trans here for a different project I built without the cable inputs. Can I use those instead?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • beacon_dave
    beacon_dave over 1 year ago in reply to Mikeatencio

    The DFRobot motors used in the project have an encoder built into them so as you can count the number of rotations as the motor runs.

    The motor/gearbox you have shown doesn't appear to have this feature.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Mikeatencio
    Mikeatencio over 1 year ago in reply to beacon_dave

    That's what I guessed. Thanks for confirming it. Thank you @beacon_dave

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube