ISU-MAVRIC / MAVRIC_Arm

MAVRIC arm control board and firmware
1 stars 1 forks source link

Code in all of our PWM objects #27

Closed markrusciano closed 9 years ago

markrusciano commented 9 years ago

Using the mbed PwmOut library (http://developer.mbed.org/handbook/PwmOut), create a PwmOut object for every PWM device we will have connected to the MAVRIC_Arm Board

Example: PwmOut arm_elbow(PA_7);

PWM Connections

Device Pin
Stepper Step PB_7
Servo 1 PC_6
Servo 2 PC_7
Servo 3 PC_8
Servo 4 PC_9
Servo 5 PB_6

If the mbed stuff is confusing, I'd recommend going through this tutorial here: https://learn.sparkfun.com/tutorials/mbed-starter-kit-experiment-guide/experiment-2-buttons-and-pwm Make sure to type the code, don't just copy paste. It has helped me a lot.

Use the old mbed code for reference if you'd like https://github.com/ISU-MAVRIC/MAVRIC_Main/blob/master/Firmware/MAVRIC_Main/main.cpp

zdanger commented 9 years ago

http://developer.mbed.org/users/zadanger/code/arm_control_pwm/rev/0f3b03031f63