
Lol smth
Dependencies: LocalPositionSystem MMA8451Q Motor_Driver Sensors mbed
Fork of TDP_main_BartFork by
main.cpp@4:3aa9c1c734fe, 2015-02-21 (annotated)
- Committer:
- Joseph_Penikis
- Date:
- Sat Feb 21 01:54:23 2015 +0000
- Revision:
- 4:3aa9c1c734fe
- Parent:
- 3:0274e082582e
- Child:
- 5:2fc7bf0135d4
IN PROGRESS, Basic constructor for motor_driver underway
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Joseph_Penikis | 3:0274e082582e | 1 | // TESTING REPO COMMIT |
Joseph_Penikis | 3:0274e082582e | 2 | |
Reckstyle | 2:e2adb7ab2947 | 3 | /* |
Reckstyle | 2:e2adb7ab2947 | 4 | ****** MAIN PROGRAM ****** |
Reckstyle | 2:e2adb7ab2947 | 5 | |
Reckstyle | 2:e2adb7ab2947 | 6 | TODO : organisational routine still to be decided. |
Reckstyle | 2:e2adb7ab2947 | 7 | 3 main approaches: |
Reckstyle | 2:e2adb7ab2947 | 8 | -sequential prirority based tasks |
Reckstyle | 2:e2adb7ab2947 | 9 | -Timer/Ticker driven with sequential prirority based tasks |
Reckstyle | 2:e2adb7ab2947 | 10 | - interrupt driven from sensor inputs |
Reckstyle | 2:e2adb7ab2947 | 11 | |
Reckstyle | 2:e2adb7ab2947 | 12 | Please consider that although it is an embedded envrionment we are NOT creating a HARD-TIME real time system - delays can be dealt with |
Reckstyle | 2:e2adb7ab2947 | 13 | */ |
Reckstyle | 2:e2adb7ab2947 | 14 | |
Reckstyle | 2:e2adb7ab2947 | 15 | |
Reckstyle | 2:e2adb7ab2947 | 16 | |
Reckstyle | 0:5ca0450111f3 | 17 | #include "mbed.h" |
Reckstyle | 0:5ca0450111f3 | 18 | #include "sensor_measure.h" |
Joseph_Penikis | 4:3aa9c1c734fe | 19 | #include "motor_driver.h" |
Reckstyle | 0:5ca0450111f3 | 20 | |
Reckstyle | 0:5ca0450111f3 | 21 | |
Reckstyle | 0:5ca0450111f3 | 22 | int main() { |
Reckstyle | 0:5ca0450111f3 | 23 | |
Reckstyle | 2:e2adb7ab2947 | 24 | sensor_initialise(); // initialise sensor values |
Reckstyle | 0:5ca0450111f3 | 25 | wait(1); //give time to set up the system |
Reckstyle | 0:5ca0450111f3 | 26 | |
Reckstyle | 0:5ca0450111f3 | 27 | } |