Added constant for RGB LEd Pins
This commit is contained in:
BIN
motor-control/firmware/README.md
(Stored with Git LFS)
BIN
motor-control/firmware/README.md
(Stored with Git LFS)
Binary file not shown.
@@ -18,11 +18,23 @@
|
||||
|
||||
#define LED_PIN 25
|
||||
|
||||
#define RGB1_R_PIN 21
|
||||
#define RGB1_G_PIN 22
|
||||
|
||||
#define RGB2_R_PIN 26
|
||||
#define RGB2_G_PIN 27
|
||||
#define RGB2_B_PIN 28
|
||||
|
||||
#define BOARD_LED1_PIN 14
|
||||
#define BOARD_LED2_PIN 15
|
||||
|
||||
#define ENABLE0_PIN 2
|
||||
#define ENABLE1_PIN 3
|
||||
|
||||
#define LIMIT0_PIN 10
|
||||
#define LIMIT1_PIN 11
|
||||
#define LIMIT2_PIN 12
|
||||
#define LIMIT3_PIN 13
|
||||
|
||||
#define STEP0_PIN 6
|
||||
#define STEP1_PIN 7
|
||||
@@ -61,10 +73,8 @@ int main() {
|
||||
|
||||
sleep_ms(5);
|
||||
|
||||
|
||||
step_driver.set_conf1(10000, 0);
|
||||
|
||||
|
||||
gpio_init(LIMIT0_PIN);
|
||||
gpio_set_dir(LIMIT0_PIN, GPIO_IN);
|
||||
gpio_pull_up(LIMIT0_PIN);
|
||||
@@ -100,6 +110,9 @@ int main() {
|
||||
gpio_init(LED_PIN);
|
||||
gpio_set_dir(LED_PIN, GPIO_OUT);
|
||||
|
||||
step_driver.set_conf0(10000, 0);
|
||||
step_driver.pulse0(1000000);
|
||||
|
||||
while (true) {
|
||||
sleep_ms(50);
|
||||
gpio_put(LED_PIN, 0);
|
||||
|
||||
Reference in New Issue
Block a user