- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi,
I am starting a project using the Intel Edison board, XBee and Eclipse IoT dev kit.
I already have some code in C for managing databases from a previous project, also found the Digi Java XBee libraries very well documented and would like to use Java as I am more familiar with it. On the other hand Im considering implementing some machine learning using Python.
As I am new on this Intel platform and IoT dev kit, my question is how to integrate different programming languages into the same project. Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Thank you for the answers, it is very helpful. I actually will rewrite the database code I have to Java but If I am not mistaken I will still need to use C for the mraa and upm libraries since I hace to include RFID readers over I2C and UART communication.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi TonyMontes,
You could write different scripts for different tasks and then, make them to share data and communicate to each other. Check the following guide; it explains how to share data between environments using text files: https://software.intel.com/en-us/blogs/2015/05/05/efficient-data-sharing-using-interrupts-on-intel-e... IoT - Data sharing between programming environments on Intel® Edison | Intel® Developer Zone
You could, for example, write a script in Python and save the results in a text file, then in a JavaScript (Java, C/C++) script, you can open that text file and access the information, or save new information.
Hope that helps you.
Regards,
Diego
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
If programs should run always, you create daemons with while(1) loops and write init scripts for the daemons. It doesn't matter what languages you'll use for them.
While writing daemons, you have to be very careful. You must catch errors and free memory correctly.
Interprocess communication can be done by different means. Unix sockets are the easiest to implement.
Why would you use C code to connect to databases when Java also has libraries for databases?
Database <-> C-code proxy <-> Java program? The C-code proxy adds complications.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Thank you for the answers, it is very helpful. I actually will rewrite the database code I have to Java but If I am not mistaken I will still need to use C for the mraa and upm libraries since I hace to include RFID readers over I2C and UART communication.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
There are Java I²C libraries for the Raspberry. There are not as many resources for the Edison. But you can try to steal parts of that Raspberry code.
Your Java code may initialize GPIO pins by writing into /sys/kernel/debug/gpio_debug/gpioN/

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page