The idea was that the controller must be ease to program, for that I used Arduino (full program available in the files section), so here are an explanation of the parts of the code that I considered more useful to understand and, of course, a general review of all the code.
The first part are de libraries used:
![](https://cdn.hackaday.io/images/2474981590984817814.png)
By default ros in the ros serial examples the TX/RX in the IC handle the nodes connections, but is possible to change that defining a new class and using it in the ros::NodeHandle declaration:
![](https://cdn.hackaday.io/images/4762921590986039502.png)
The function that fill the variables with data is:
![](https://cdn.hackaday.io/images/5577241590986713679.png)
The last part is:
![](https://cdn.hackaday.io/images/5608891590986967696.png)
So that's all, if you have any question just ask in the comments.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.