Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
Hi All,
I want to create a number of objects (AX-12+ servos in this case) on the fly and give them different names. The objects use the same mbed pins so the only thing standing in my way are the names.
I want some thing like this...
//Create 10 AX-12+ objects named myAX12_1, myAX12_2, etc... for(int i=1, i<11, i++){ AX12 myAX12_i (p9, p10, i); }Can anyone help me out and tell me how to get the 'myAX12_' + i working?
Cheers, Martin