Simon's and Max' camera steering software. https://stiefel.tech
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
702 B

4 years ago
#include <iostream>
#include <include/a4988.h>
#include <include/stepper.h>
4 years ago
#include <thread>
#include <functional>
#include <memory>
4 years ago
int main()
{
using namespace simon;
a4988::a4988_settings_t a4988_set{
4 years ago
.gpio_en = 17,
.gpio_step = 18,
.gpio_dir = 22,
.gpio_microsteps{
true, true, true
}
};
stepper::settings_t stepper_set{
.gear_reduction = 64.0f,
.steps_per_revolution = 32.0f
};
/*
4 years ago
c_allegro_4988 a4988(&a4988_set);
std::thread t1(std::bind(&c_allegro_4988::run, &a4988));
a4988.post_move(32768, true, 100);
a4988.kill();
4 years ago
t1.join();
*/
stepper::c_stepper(&stepper_set, &a4988_set);
4 years ago
std::cout << "Hello camera" << std::endl;
return 0;
}