Skip to content

sceneeeee/MEC108_Lab1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MEC108 Lab 1

Arduino sketches and lab materials for MEC108 Lab 1. The examples focus on basic stepper motor control with the AccelStepper library, including single direction movement, limit switch sensing, and controlled return motion.

Contents

  • MEC108 Lab 1 Manual.pdf - lab handout and reference material.
  • Stepper_Example/ - starter sketch for stepper configuration and serial output.
  • left/ - moves the stepper motor left for a fixed number of steps.
  • right/ - moves the stepper motor right for a fixed number of steps.
  • M5/ - moves right until a limit switch is triggered, pauses, then moves left for a timed interval.
  • M5v1/ - moves right until a limit switch is triggered, pauses, then moves left for a fixed step count.

Hardware Notes

  • Stepper pulse pin: digital pin 2
  • Stepper direction pin: digital pin 5
  • Limit switch pin: digital pin 9 with INPUT_PULLUP
  • Arduino library: AccelStepper

Usage

  1. Install the AccelStepper library in the Arduino IDE.
  2. Open the desired .ino sketch folder in the Arduino IDE.
  3. Connect the stepper driver and limit switch according to the pin notes above.
  4. Upload the sketch to the Arduino board.
  5. Open Serial Monitor at 9600 baud to view status messages where available.

About

MEC108 Lab 1 Arduino sketches for stepper motor control and limit switch sensing.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages