Thursday, November 5, 2015

An Achievement!

Working on some embedded system modules that aren't touched by anyone in opensource community is a real pain in the ass. A few days ago, I was chewing nails over some failures in work. Problems that become hard obstacles are milestones for me. I seek pleasure solving problems because when you get successful solving a problem, it becomes clear to you that problem of such difficulty level can be resolved. After solving a few different problem sets from different domains, you start realizing that nothing seems impossible to you anymore. That is the lesson I learned from the recent work I am doing.

Main focus these days is embedding communication protocols in Arduino Yun (cloud in Chinese). I was stuck embedding C/C++ libraries with Arduino. Because I wasn't seeing the real picture and wasn't considering the fact that Yun is technically more capable than Uno (Arduino board I was previously working with in my college days).


Real problem arose when I started looking at the system as an incapable machine and tried to put responsibilities on myself rather exposing full functionality of board itself.

I wasn't been able to embed C/C++ libraries into Yun.

One thing to be considered while working with Arduino is concept of library. A library in Arduino is not some sort of embed-able unit with the binary file that is to be deployed in it. In Arduino, library is just a bunch of classes providing functionality. Not like .dll/.so (dynamic) or .lib/.a (static library) in C/C++.


By using the Arduino Yun's Leonardo side (a linux-based processor) running kernel of OpenWRT (an opensource light-weight distribution for Yun), you can use all functionalities of Linux system (almost).

There are multiple languages support in Linino (OpenWRT) like Python, PHP5, Bash (not a language after all).

So you can simple run Python scripts using python compiler inside Arduino, run Bash scripts, run C programs using yun-gcc package.

Use make to Makefile projects.

Then, by using Bridge you can simply use these scripts that reside inside Linino by creating Process(es) and running them on your ATmega processor in sketch file programs.

Hi five!

No comments :

Post a Comment