Has anyone created a library for the mcp2515 can bus. Ineed to read a data value from a can Id
I’m curious as to why no has replied to any of the previous requests for CAN libraries with xod, can it even be done. I have just started using xod as i struggle with programing however i have been able to use xod to create programs for several of my projects in a record time. The problem is i need many of these projects to integrate with various CAN networks just for passing variables to and from the CAN bus in order to complete them. I have looked at trying to write my own but this is way outside of my knowledge and understanding of programing. there is a number of good arduino libraries for CAN but i have no idea how to integrate them or convert them for use with XOD, is anyone able to offer me some advice on the direction i could go. Any input would be helpful.
Thankyou.
Greetings! Here is a link to a tutorial on how to create wrappers: Wrapping Class-based Arduino Libraries — XOD Also, be sure to check out this thread: Guide to converting Arduino libraries to XOD Try to work with it. If something doesn’t work out, I’ll try to join in solving the problem if possible)) In any case, find the simplest of the can bus libraries for arduino first. Then you can try to make a wrap for her. Be sure to let us know if something works out!
nazarijtipusak080 provides a good start into using Arduino libraries in XOD. Just to help set expectations for yourself, while XOD makes programming easy using existing nodes, it is NOT so trivial to create new nodes or import existing Arudino libraries. It can be done, but is not trivial, especially for people using XOD because they couldn’t get a handle on IDE due to lack of programming experience. This is not to say that you should not try, but I encourage you not to get frustrated if you fail. It will be a great learning experience if you succeed, and someone else may be able to help if you fail to generate the code you want on your own. Just realize as you dive into this, it is probably going to be a challenge, and not just a couple quick clicks to get things imported into XOD.
Even if you can’t get the entire Arduino library working in XOD, if you only need limited functionality, you might be able to copy some of the library code into your own XOD nodes to implement just the functionality you need. Unfortunately, this will probably require some formatting changes that will probably not be obvious to you if you are not familiar with IDE code or C++.
I didn’t mean to make this post sound so discouraging, but I think I would be more discouraged if I jumped into it thinking there was an easy solution to my problem and then feel like an idiot for not seeing the obvious solution. The problem is likely to be that the solution is not so obvious, so don’t be too hard on yourself.
Thanks for the advice, i will give it another go as soon as i get a chance thankyou
i appreciate your feedback i wish i was better at c++ but i just dont have the focus to write code thats where if i can get xod to do the functions i need it will greatly speed up my development time on these projects. I will have a go coverting the library as soon as i get a chance
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.