diff --git a/circuit/README.md b/circuit/README.md index adcc05486a865610c18635a1baa92439e3d9a397..5039391924e642cc3f63d4d35b6443be4088bdde 100644 --- a/circuit/README.md +++ b/circuit/README.md @@ -22,4 +22,10 @@ You'll also notice that I haven't done an excellent job of providing a solid gro I had this manufactured, and got the solder stencil, so that just left me to place components and reflow. Somewhere along the way I royally screwed up my reflow profile. Next time I fab a set, I'll put an image here, and start the programming folder. - \ No newline at end of file + + +# Scope Traces! + + + + \ No newline at end of file diff --git a/circuit/mkstepper/eagle.epf b/circuit/mkstepper/eagle.epf index 149981c599b66c2fa521af729a3ee3ac01ba4369..3c2776b9edf04ceb58dfe0a039e167cbf2eb4f3a 100644 --- a/circuit/mkstepper/eagle.epf +++ b/circuit/mkstepper/eagle.epf @@ -85,7 +85,7 @@ Loc="0 0 1919 1016" State=1 Number=2 File="mkstepper.brd" -View="-7.01729 10.7809 88.3788 38.7917" +View="-9.65867 9.69013 85.7374 37.7009" WireWidths=" 0.0762 0.1016 0.127 0.4064 0.15 0.2032 0.508 1.016 0.254 0.2 2.54 0.1524 1.27 0.8128 0.6096 0.3048" PadDiameters=" 0.6096 0.8128 1.016 1.27 1.4224 1.6764 1.778 1.9304 2.1844 2.54 3.81 6.4516 0 0.55 0.45 0.425" PadDrills=" 0.2 0.25 0.4 0.45 0.5 0.55 0.65 0.7 0.75 0.8 0.85 0.9 1 0.6 0.35 0.3" @@ -132,7 +132,7 @@ State=1 Number=0 [Desktop] -Screen="1920 1080" +Screen="6000 2160" Window="Win_1" Window="Win_2" Window="Win_3" diff --git a/embedded/mkstepper-v011/mkstepper-v011/main.c b/embedded/mkstepper-v011/mkstepper-v011/main.c index c605457b3a87a745313cd6c8e71cb03616867172..3498f064829e53ee07365f3a19c34b9690107b89 100644 --- a/embedded/mkstepper-v011/mkstepper-v011/main.c +++ b/embedded/mkstepper-v011/mkstepper-v011/main.c @@ -218,7 +218,7 @@ int main(void) stepper = stepper_new(&step_pin, &dir_pin, 360.0, 64); - stepper_goto(&stepper, 1800, 180); // should do 5 turns in 10 seconds + stepper_goto(&stepper, 360, 360); // should do 5 turns in 10 seconds while (1) { @@ -240,6 +240,7 @@ int main(void) } uint8_t lpcnt = 0; +uint8_t stpcnt = 0; void SysTick_Handler(void){ lpcnt ++; @@ -258,6 +259,11 @@ void SysTick_Handler(void){ uart_sendchar_buffered(&up1, w2); uart_sendchar_buffered(&up1, w3); uart_sendchar_buffered(&up1, w4); + + if(stepper.position_ticks_target == stepper.position_ticks){ + stpcnt ++; + stepper_goto(&stepper, 360 * (stpcnt % 2), 720); + } } void SERCOM4_0_Handler(void){ diff --git a/images/scope-many.jpg b/images/scope-many.jpg new file mode 100644 index 0000000000000000000000000000000000000000..25462d026dc9db5da53b21e8261c7031f40d8829 Binary files /dev/null and b/images/scope-many.jpg differ diff --git a/images/scope-single-wave.jpg b/images/scope-single-wave.jpg new file mode 100644 index 0000000000000000000000000000000000000000..23cbce3bebd638c109a11121d65018ead2157a0f Binary files /dev/null and b/images/scope-single-wave.jpg differ