element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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 & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • 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
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • 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
Arduino
  • Products
  • More
Arduino
Arduino Forum Arduino Uno + Raspberry Pi + workout stepper.
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 15 replies
  • Subscribers 402 subscribers
  • Views 1443 views
  • Users 0 members are here
  • raspberrypi
  • arduino
Related

Arduino Uno + Raspberry Pi + workout stepper.

dtsartsanis
dtsartsanis over 10 years ago

Hi everybody this is a very simple project i just finished.

 

For this project i used an Arduino UNO, a Raspberry PI model B, a couple of leds and a workout stepper. Usually workout steppers have small displays and you have to look down to see the progress of your workout. In my project i managed to remove the old display, connected to Arduino UNO as a simple switch. Then UNO is running the sketch through the Raspberry and using Pyserial, Bottle.py and Arduino-Serial-to-Browser so we can have our stepps to our browser.

 

Raspberry PI is using the latest raspbian image and after we fully update and upgrade it, we have to install the Arduino IDE. i preferred to install the latest one 1.6.0 which works fine.We dont have to install pyserial because it is already installed, but we have to install Bootle.py (see here Bottle: Python Web Framework — Bottle 0.13-dev documentation ) and Arduino-Serial-to-Browser from here https://github.com/whichlight/Arduino-Serial-to-Browser .

 

We start by uploading the sketch to UNO, then we open a terminal and we run the Arduino-Serial-to-Browser.py and finally we can open a browser and we type http:/127.0.0.1:8080.

 

The Arduino also have 5 leds. 4 for our step progress and one blinking for every two steps because the sketch counts 1 step for every 2 physical steps.in the delay time i noticed that if you set 500 ms then we have 1 step for every 1 physical step.

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

Attachments:
arduino_stepper_counter_leds.ino.zip
  • Sign in to reply
  • Cancel

Top Replies

  • gadget.iom
    gadget.iom over 10 years ago in reply to clem57 +2
    Well according to his code the Green lights every 2 steps, the other 4 light up sequentially at 500, 1000, 1500, 2000 steps. They all cycle in order above 2100 steps.
  • gadget.iom
    gadget.iom over 10 years ago +1
    Nice work! You could simplify your setup and look at arduino-ethernet bridges and host the web page on the UNO.
  • clem57
    clem57 over 10 years ago +1
    dtsartsanis I like the way you used the Raspberry Pi with Arduino. Especially Arduino-Serial-to-Browser software gem. The combination of Arduino Uno with Raspberry Pi looks to be equivalent to Arduino…
Parents
  • dtsartsanis
    dtsartsanis over 10 years ago

    This is how u connect the stepper to the Arduino and the led's connections.

     

    image

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • clem57
    clem57 over 10 years ago in reply to dtsartsanis

    What do all the LED's tell you?image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • clem57
    clem57 over 10 years ago in reply to dtsartsanis

    What do all the LED's tell you?image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • gadget.iom
    gadget.iom over 10 years ago in reply to clem57

    Well according to his code the Green lights every 2 steps, the other 4 light up sequentially at 500, 1000, 1500, 2000 steps. They all cycle in order above 2100 steps.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
  • clem57
    clem57 over 10 years ago in reply to gadget.iom

    Thanks Paul

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • dtsartsanis
    dtsartsanis over 10 years ago in reply to gadget.iom

    Yes Paul is right.

    I wanted to add a kind of target. Something like when you go for run and you say "i want to run 5k", similar here you can add a target to light up 2 or 3 or all the leds

    And u have a confirmation that u achieved your target with the cycle of all the 4 leds.

    • 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