Skip to content

MazinLab/heatswitch_driver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Heat Switch Driver

Rust driver for controlling Zaber T-NM17A04 stepper motor for opening/closing heat switch

Installation

1. Clone the Repository

git clone https://github.com/MazinLab/heatswitch_driver
cd heatswitch_driver

2. Build the Project

cargo build --release

3. Add to PATH (Optional but Recommended)

To run the heatswitch command from anywhere, add the binary location to your bashrc:

echo 'export PATH="$HOME/heatswitch_driver/target/release:$PATH"' >> ~/.bashrc
source ~/.bashrc

Or create an alias:

echo 'alias heatswitch="~/heatswitch_driver/target/release/heatswitch_driver"' >> ~/.bashrc
source ~/.bashrc

4. Verify Installation

heatswitch --help

Usage

Note that counterclockwise on the motor is actual a clockwise rotation on the heatswitch and vice versa. If you want to rotate the heatswitch closed (which is a clockwise rotation), you have to execute the motion counterclockwise. The commands for open and close already account for this discrepancy

# Current position 
heatswitch pos

# Close heatswitch (counterclockwise 115200 steps)
heatswitch close

# Open heatswitch (clockwise 115200 steps) 
heatswitch open 

# Rotate clockwise 1000 steps
heatswitch cw 1000

# Rotate counterclockwise 1000 steps
heatswitch ccw 1000

# Move to absolute position
heatswitch move-abs 1000

# Get motor status
heatswitch status

# Stop motor
heatswitch stop

# Custom port/settings
heatswitch --port /dev/ttyUSB0 --baudrate 115200 pos

License

APACHE

About

Driver for heat switch stepper motor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages