Signori, questo è il codice di doukietown...... divertitevi
Dependencies: HCSR04 TCS3200 X_NUCLEO_IHM12A1 mbed
Fork of HelloWorld_IHM12A1 by
Revision 6:bd2fa888c101, committed 2017-03-24
- Comitter:
- Davidroid
- Date:
- Fri Mar 24 14:13:53 2017 +0000
- Parent:
- 5:7517162fb2b9
- Child:
- 7:b0ba8a7b6e9f
- Commit message:
- With the new version of the library.
Changed in this revision
X-NUCLEO-IHM12A1.lib | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/X-NUCLEO-IHM12A1.lib Fri Mar 24 11:01:02 2017 +0100 +++ b/X-NUCLEO-IHM12A1.lib Fri Mar 24 14:13:53 2017 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/teams/ST/code/X_NUCLEO_IHM12A1/#232e0c730f59 +https://developer.mbed.org/teams/ST/code/X_NUCLEO_IHM12A1/#07acd6934359
--- a/main.cpp Fri Mar 24 11:01:02 2017 +0100 +++ b/main.cpp Fri Mar 24 14:13:53 2017 +0000 @@ -47,7 +47,7 @@ /* Variables -----------------------------------------------------------------*/ /* Initialization parameters of the motor connected to the expansion board. */ - Stspin240_250_init_t init = + STSpin240_250_init_t init = { 20000, /* Frequency of PWM of Input Bridge A in Hz up to 100000Hz */ 20000, /* Frequency of PWM of Input Bridge B in Hz up to 100000Hz */ @@ -57,7 +57,7 @@ }; /* Motor Control Component. */ -STSPIN240_250 *motor; +STSpin240_250 *motor; /* Functions -----------------------------------------------------------------*/ @@ -120,11 +120,11 @@ /* Initializing Motor Control Component. */ #if (defined TARGET_NUCLEO_F030R8)||(defined TARGET_NUCLEO_F334R8) - motor = new STSPIN240_250(D2, D9, D6, D7, D5, D4, A2); + motor = new STSpin240_250(D2, D9, D6, D7, D5, D4, A2); #elif (defined TARGET_NUCLEO_L152RE) - motor = new STSPIN240_250(D2, D9, D6, D7, D5, D4, A3); + motor = new STSpin240_250(D2, D9, D6, D7, D5, D4, A3); #else - motor = new STSPIN240_250(D2, D9, D6, D7, D5, D4, A0); + motor = new STSpin240_250(D2, D9, D6, D7, D5, D4, A0); #endif if (motor->init(&init) != COMPONENT_OK) exit(EXIT_FAILURE); @@ -261,7 +261,7 @@ default: { printf("STEP 12: Stop both motors and enter standby mode\r\n"); /* Stop both motors and put chip in standby mode */ - motor->Reset(); + motor->reset(); break; } }