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: mbed
Revision 7:b13a3b87bfbe, committed 2017-04-12
- Comitter:
- aeschsim
- Date:
- Wed Apr 12 11:56:23 2017 +0000
- Parent:
- 6:7c398818af20
- Child:
- 8:ac612798d650
- Commit message:
- added some printf;
Changed in this revision
board.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/board.cpp Tue Apr 11 18:39:19 2017 +0000 +++ b/board.cpp Wed Apr 12 11:56:23 2017 +0000 @@ -54,7 +54,7 @@ uint8_t prescale = floor(prescaleval +0.5f); i2c.read((PCA9685_ADDRESS<<1),read,1); uint8_t oldmode = (int) read[0]; - printf("%d",oldmode); + printf("oldmode: %d",oldmode); uint8_t newmode = (oldmode&0x7f) | 0x10; data[0] = (char) MODE1; @@ -63,6 +63,7 @@ data[0] = (char) PRESCALE; data[1] = (char) prescale; + printf("prescale %d",data[1]); i2c.write((PCA9685_ADDRESS<<1), data,2); data[0] = (char) MODE1; @@ -77,6 +78,7 @@ i2c.write((PCA9685_ADDRESS<<1), data,2); */ Servo_enable = 1; + printf("init done..."); } /*void set_servo_position(int servo, int deg){ @@ -100,6 +102,7 @@ char data[3]; int16_t wert1 = (deg>>8); int16_t wert2 = (deg & 0xFF); + printf("%x %x servo deg",wert1,wert2); data[0] = (char)LED0_ON_L+(4*servo); data[1] = (char)wert1; data[2] = (char)wert2;