1 year, 8 months ago.

Error: Identifier "SerialHalfDuplex" is undefined in "AX12/AX12.h", Line: 183, Col: 6

I am having this error message when compiling the program. Error: Identifier "SerialHalfDuplex" is undefined in "AX12/AX12.h", Line: 183, Col: 6 How should I fix it?

Question relating to:

3 Answers

7 months, 3 weeks ago.

Yeah, looks like they just removed the half duplex library without offering a replacement or alternative. The serial library offered only supports duplex and simplex, so far as the documentation seems to indicate.

So Serial is not a valid replacement.

1 year, 8 months ago.

Hi there,

This error is because the Mbed OS 2 library no longer has a class named SerialHalfDuplex, in order to successfully compile your program please update your Mbed 2 library to the latest version by right-clicking on mbed and selecting "Update...". Then go into the AX12.h header file and replace line 183 with the following code:

Serial _ax12;

Please let me know if you have any questions!

- Jenny, team Mbed

If this solved your question, please make sure to click the "Thanks" link below!

1 year, 4 months ago.

Hello Jenny, I tried doing the modification you suggested. The code is compiling but the motor isn't moving.

I'm using a Nucleo-F303RE I use the Example code with the only modification being the pins : AX12 myax12 (D9, D10, 1); I also tried : AX12 myax12 (D9, D10, 1); AX12 myax12 (USBTX, USBRX, 1); and AX12 myax12 (USBRX, USBTX, 1); I triple checked the wiring and its correct Would you have any idea as to why ?