Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FiniteStateMachine HipControl Knee LinearBlend1 LocalFileSystem_Read dataComm hapticFeedback initExoVars mbed Blend_Generator Brad_poly_gait Gait_Generator MM_gait Encoders IMUdriver
Fork of Motion Control by
Revision 42:9ea65e8a5b9c, committed 2015-06-27
- Comitter:
- perr1940
- Date:
- Sat Jun 27 21:45:35 2015 +0000
- Parent:
- 41:68f130768877
- Child:
- 43:b579fcb0868d
- Commit message:
- small changes... modifying Kp and Kd ranges and merged
Changed in this revision
--- a/FiniteStateMachine.lib Fri Jun 26 21:40:20 2015 +0000 +++ b/FiniteStateMachine.lib Sat Jun 27 21:45:35 2015 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/teams/HELs-Angels/code/FiniteStateMachine/#4d45fa60e15c +https://developer.mbed.org/teams/HELs-Angels/code/FiniteStateMachine/#8ca58aadb0c9
--- a/Gaits/Blend_Generator.lib Fri Jun 26 21:40:20 2015 +0000 +++ b/Gaits/Blend_Generator.lib Sat Jun 27 21:45:35 2015 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/users/perr1940/code/Blend_Generator/#14e1a3064ea7 +http://developer.mbed.org/teams/HELs-Angels/code/Blend_Generator/#14e1a3064ea7
--- a/Gaits/Gait_Generator.lib Fri Jun 26 21:40:20 2015 +0000 +++ b/Gaits/Gait_Generator.lib Sat Jun 27 21:45:35 2015 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/users/perr1940/code/Gait_Generator/#3091964e08d6 +http://developer.mbed.org/teams/HELs-Angels/code/Gait_Generator/#3091964e08d6
--- a/Gaits/MM_gait.lib Fri Jun 26 21:40:20 2015 +0000 +++ b/Gaits/MM_gait.lib Sat Jun 27 21:45:35 2015 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/teams/HELs-Angels/code/MM_gait/#0adb24b1e834 +http://developer.mbed.org/teams/HELs-Angels/code/MM_gait/#7f914e56d76e
--- a/dataComm.lib Fri Jun 26 21:40:20 2015 +0000 +++ b/dataComm.lib Sat Jun 27 21:45:35 2015 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/teams/HELs-Angels/code/dataComm/#a00284eaa232 +https://developer.mbed.org/teams/HELs-Angels/code/dataComm/#eabee8ac7dcd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hapticFeedback.lib Sat Jun 27 21:45:35 2015 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/teams/HELs-Angels/code/hapticFeedback/#ea2b9b15a433
--- a/hapticFeedback/hapticFeedback.cpp Fri Jun 26 21:40:20 2015 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +0,0 @@
-//11/13/12 MM Made fix to haptic error where exo would freak out when it was in the sitting position and you commanded it to stand up
-#include "mbed.h"
-#include "HipControl.h"
-#include "hapticFeedback.h"
-
-// arpeggio down (A E C# A) = f(880 659 554 440) = T(.0011363 .00151745 .00180505 .0022727)
-// doogie howser MD theme (A(high) A(high) A(Low) A(low) A(high) D#) = f(880 880 440 440 880 622) = T(.0011363 .0011363 .0022727 .0022727 .0011363 .0016077)
-
-const float arpeggio[] = {.0011363, .00151745, .00180505, .0022727};
-const float arpeggio_t[] = {.1, .1, .1, .1};
-const float DH[] = {.0011363, .00005, .0011363, .00005, .0022727, .00005, .0022727, .00005, .0011363, .00005, .0016077}; // doogie howser periods
-const float DH_t[] = {.1, .05, .1, .05, .1, .05, .1, .05, .1, .05, .1};
-const float IronMan[] = {0.0010124,0.0008513,0.00005,0.0008513,0.00005,0.0007584,0.00005,0.0007584,0.0006378,0.0006757,0.0006378,0.0006757,0.0006378,0.0006757,0.0008513,0.000050,0.0008513,0.000050,.0007584,0.00005,0.0007584};
-const float IronMan_t[] = {.8,.5,.3,.3,.1,.3,.1,.4,.2,.2,.2,.2,.2,.2,.3,.1,.3,.1,.3,.1,.3};
-const float lockSound[] = {.0011363,.0022727};
-const float lockSound_t[] = {.3, .3};
-const float unlockSound[] = {.0022727,.0011363};
-const float unlockSound_t[] = {.2, .2};
-const float LowBatterySound[] = {.00151745,.00151745};
-const float LowBatterySound_t[] = {.1,.1};
-const short unsigned int IronMan_count=(sizeof(IronMan)/sizeof(IronMan[0]))-1;
-const short unsigned int arpeggio_count=(sizeof(arpeggio)/sizeof(arpeggio[0]))-1;
-const short unsigned int DH_count=(sizeof(DH)/sizeof(DH[0]))-1;
-const short unsigned int lockSound_count=(sizeof(lockSound)/sizeof(lockSound[0]))-1;
-const short unsigned int unlockSound_count=(sizeof(unlockSound)/sizeof(unlockSound[0]))-1;
-
-
-bool hapticOn = false;
-int buzzMode;
-
-MotorMusic::MotorMusic(HipControl& left, HipControl& right):pwmDefault(0.00005),count(0),count_max(0),_left(left),_right(right)
-{
- time.start();
-}
-void MotorMusic::setDefault(float a)
-{
- pwmDefault=a;
-}
-void MotorMusic::check()
-{
- if (musicFlag==1) {
- song();
- }
-}
-void MotorMusic::init()
-{
- _left.pwmPeriod(ptrNotes[count]); //play first note
- _right.pwmPeriod(ptrNotes[count]); //play first note
-}
-void MotorMusic::song()
-{
- if(time.read()>=ptrTimes[count]) { //change note if the time to play the previous note is over
- count++; //change note counter
- time.reset(); //reset and start timer
- _left.pwmPeriod(ptrNotes[count]); //increment note
- _right.pwmPeriod(ptrNotes[count]); //increment note
- }
- if(count>count_max) {
- _left.pwmPeriod(pwmDefault); //increment note
- _right.pwmPeriod(pwmDefault); //increment note
- count=0; //counter to change notes
- musicFlag=0; //flag to signal playing music
- }
-}
-
-
-void MotorMusic::playIronMan()
-{
- ptrNotes=IronMan; //point to the Iron Man notes array
- ptrTimes=IronMan_t;//point to the Iron Man times array
- time.reset();//reset timer for music
- musicFlag=1;//flag to play music
- count_max=IronMan_count;
- init();
-}
-void MotorMusic::playArpeggio()
-{
- ptrNotes=arpeggio; //point to the Iron Man notes array
- ptrTimes=arpeggio_t;//point to the Iron Man times array
- time.reset();//reset timer for music
- musicFlag=1;//flag to play music
- count_max=arpeggio_count;
- init();
-}
-void MotorMusic::playDH()
-{
- ptrNotes=DH; //point to the Iron Man notes array
- ptrTimes=DH_t;//point to the Iron Man times array
- time.reset();//reset timer for music
- musicFlag=1;//flag to play music
- count_max=DH_count;
- init();
-}
-void MotorMusic::playLock()
-{
- ptrNotes=lockSound; //point to the Iron Man notes array
- ptrTimes=lockSound_t;//point to the Iron Man times array
- time.reset();//reset timer for music
- musicFlag=1;//flag to play music
- count_max=lockSound_count;
- init();
-}
-void MotorMusic::playUnlock()
-{
- ptrNotes=unlockSound; //point to the Iron Man notes array
- ptrTimes=unlockSound_t;//point to the Iron Man times array
- time.reset();//reset timer for music
- musicFlag=1;//flag to play music
- count_max=unlockSound_count;
- init();
-}
-//WTF is this? MM
-
-
--- a/hapticFeedback/hapticFeedback.h Fri Jun 26 21:40:20 2015 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-#ifndef HAPTIC_H
-#define HAPTIC_H
-
-#include "mbed.h"
-#include "HipControl.h"
-
-extern bool hapticOn;
-
-class MotorMusic
-{
-public:
- MotorMusic(HipControl &left, HipControl &right);
- void check();
- void playIronMan();
- void playArpeggio();
- void playDH();
- void playLock();
- void playUnlock();
- void setDefault(float a);
-private:
- void song();
- void init();
- Timer time;
- HipControl _left;
- HipControl _right;
- bool musicFlag;
- const float *ptrNotes;
- const float *ptrTimes;
- int count_max;
- int count;
- float pwmDefault;
-
-};
-
-#endif
-
-extern void initializeHapticFeedback(int);
-extern void hapticMaintenance();
\ No newline at end of file
--- a/initExoVars.lib Fri Jun 26 21:40:20 2015 +0000 +++ b/initExoVars.lib Sat Jun 27 21:45:35 2015 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/teams/HELs-Angels/code/initExoVars/#fcd299262d0a +https://developer.mbed.org/teams/HELs-Angels/code/initExoVars/#bbcbecee4183
