0
Sp0T

Programing on a Orange PI

Recommended Posts

Hello Guys,

 

The main reason I bought my orange pi One is to create custom softwares on it(mostly on Linux distro). I checked google and can't really decide which is the best programming language, which have a nice IDE, able to handle GPIO-s and other periferials like SPI, COM...etc, able to create a fair looking UI.

 

Can someone suggest me some ideas? Programming language does not really matter. Any ideas are welcome :)

 

Regards,

G.

Share this post


Link to post
Share on other sites

I program few things with Raspberry and Orange PI or Banana. I use Visual Studio Code available on Mac Windows & Linux because this IDE is free, open source, available on different OS and it is fast and clever. Apps are in python, I use GPIO I2C... I do not use the language to program nice UI because it is for my pleasure, not for customers (I am IT engineer).

 

I discovered python recently, just to learn new things and I liked it immediately. I do not program with c++ since ages and I do not want to use it anymore, no pleasure at all.  

Share this post


Link to post
Share on other sites

I'll assume for UI you want to use the console, i.e. built-in video out and keyboard/pointer input.  In that case, since you want good IDE support, consider Electron (https://electron.atom.io) which is sort of a Chromium + Node.js mashup.  The familiar programming model of HTML5/DOM/CSS/JavaScript and the I/O and package management model of Node.js are available to you.  Some rasPi Node.js I/O modules will work directly, or with some modification.  You should be able to use any web-development IDE of your choice that works with Node.js and Chromium, even over-the-wire debugging.  You can even start an HTTP API and/or serve a web interface in a few dozen lines of code!  On the other hand, JIT-compilers and browsers are big and hungry, so there is little room to spare in 512MB.  Avoid using other heavyweight frameworks and libraries, disable or bypass unneeded services, etc.

 

If you need something more lightweight, consider wxLua (http://wxlua.sourceforge.net/), which I haven't tried, but which appears to fit your bill.  It comes with some sort of code editor.  I have successfully used the "periphery" module which supports GPIO, SPI, UART, and more.  Beware, Lua is barebones and single-threaded.  If you want multi-tasking, you must bring your own scheduler (the LOOP object oriented programming library has a few) and often you must hook things up to it manually.

 

If you wanted a great out-of-box experience, BeagleBone Black and its vendor Linux distro would have been the best choice.  It has HDMI out, a fine web IDE (Cloud9) on board, an Ethernet gadget enabled by default, Node.js modules for much of its hardware ensemble, and many tutorials.  On a general-purpose Linux like Armbian, you get to combine all the myriad possibilities for yourself.  Poring over catalogs and web sites to learn all of what's available and to make tradeoffs between the options is half the fun.  Welcome to embedded development :)  I hope this helps.

Share this post


Link to post
Share on other sites

Thank you guys for the great helps. Electron is looks promising, and It's up to date. I found another solution too. I Have an A20 board, where I installed Lazarus, but I cannot slove the I/O ports handling. Thanks for a great site now I found a solution on that. It's called PXL Library http://asphyre.net/products/pxl. I'll try out both solution and compare them based on resource using, GUI Development...etc

 

Regards,

Sp0T 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
0