From: Xavier L. <Ba...@us...> - 2011-03-09 22:36:56
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via e476dc09ceff35fb8cdb02567bd1e6a05087b85f (commit) from 0593cd300075efed3225933eb84e318a15a53cca (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e476dc09ceff35fb8cdb02567bd1e6a05087b85f Author: Xavier Lagorce <Xav...@cr...> Date: Wed Mar 9 23:35:08 2011 +0100 [Controller_Motor_STM32] Rock and Roll's ! (but mainly rolls...) ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/main.c b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/main.c index 65e8e2e..c7eac19 100644 --- a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/main.c +++ b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/main.c @@ -75,6 +75,39 @@ static void NORETURN blink_process(void) } } +static void NORETURN square_process(void) +{ + /* blinkenlichten ! */ + while (1) + { + motorSetSpeed(MOTOR3 | MOTOR4, 500); + timer_delay(2000); + motorSetSpeed(MOTOR3, -500); + timer_delay(2000); + motorSetSpeed(MOTOR3 | MOTOR4, 500); + timer_delay(2000); + motorSetSpeed(MOTOR4, -500); + timer_delay(2000); + motorSetSpeed(MOTOR3 | MOTOR4, 500); + timer_delay(2000); + motorSetSpeed(MOTOR3 | MOTOR4, 1000); + timer_delay(2000); + motorSetSpeed(MOTOR3 | MOTOR4, 1500); + timer_delay(2000); + motorSetSpeed(MOTOR3 | MOTOR4, 2000); + timer_delay(2000); + motorSetSpeed(MOTOR3 | MOTOR4, 2500); + timer_delay(2000); + motorSetSpeed(MOTOR3 | MOTOR4, 3000); + timer_delay(2000); + motorSetSpeed(MOTOR3 | MOTOR4, 3500); + timer_delay(2000); + motorSetSpeed(MOTOR3 | MOTOR4, 0); + timer_delay(2000); + break; + } +} + int main(void) { @@ -83,8 +116,9 @@ int main(void) /* Create a new child process */ proc_new(speaktome_process, NULL, KERN_MINSTACKSIZE * 2, NULL); proc_new(blink_process, NULL, KERN_MINSTACKSIZE * 2, NULL); + proc_new(square_process, NULL, KERN_MINSTACKSIZE * 2, NULL); - LED3_ON(); + enableMotor(MOTOR3 | MOTOR4); /* * The main process is kept to periodically report the stack hooks/post-receive -- krobot |