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.
Dependents: Nucleo_robot_2ndaire
Fork of AX12 by
Diff: AX12.cpp
- Revision:
- 1:40bc0469fd51
- Parent:
- 0:db8f063d50f0
--- a/AX12.cpp Wed Oct 05 12:08:21 2011 +0000 +++ b/AX12.cpp Sat Apr 11 16:07:29 2015 +0000 @@ -264,6 +264,17 @@ return (angle); } +int AX12::GetSpeed(void) { + + printf("\nGetSpeed(%d)",_ID); + + char data[2]; + + int ErrorCode = read(_ID, 0x26, 2, data); + int position = data[0] + (data[1] << 8); + + return (position); +} float AX12::GetTemp (void) {