当前位置:网站首页>A good tool: aardio

A good tool: aardio

2022-04-23 14:29:00 strongerHuang

Focus on + Star sign public Number , Don't miss the highlights

b22eaf8b9ea1083c7e202418e49b4682.gif

source  | Embedded hodgepodge

Today, I'll give you an active one 17 Development tools in :aardio.

Protagonist of this issue :aardio

aardio It belongs to a dynamic language with strong ease of use , But it's also a mixed language , Can be rare 、 It's very convenient to manipulate static types , So you can call C Language 、C++ And so on, static language API The interface function .

aardio Applied to desktop software development .aardio Has developed 17 year , Keep updating very actively .

52f570b1665f7a08b5efae47840a000a.png

aardio Characteristics :

  • Good architecture and grammar

  • Small 、 light 、 fast , Light and agile , Volume only 6.5MB, The cost of learning and using is very low

  • Glue ability is very strong

  • You can embed a lot of browser controls

  • Not just desktop software , It can also be used to develop websites

  • You can easily create programs by dragging and dropping traditional controls

aardio Official website :

https://www.aardio.com/

aardio Use

aardio To put it bluntly, it is a programming language , It's flexible and powerful . Let's briefly understand it through examples aardio.

First , from aardio Download it from the official website aardio Development kit :

b2300c6eb114339ee0c07150ed60da05.png

aardio The development package is very small ! The contents are :

89a47f6785cd7eea4a9bfb6846860925.png

among , development tool aardio.exe Only 6MB! Compared with others such as Qt Creator、VS Just a few development tools G,aardio.exe Small is a big advantage .

aardio.exe The interface is as follows: :

3339834b59995fd72568a7dbc6fbc9be.png

aardio Focus on desktop software development . Let's see how to use it aardio To write a simple Serial port lighting upper computer . you 're right , We had this before based on QT Hands on development tutorial : Understandability | Teach you to write your first upper computer

This article is based on aardio To write a , Experience desktop software rapid development !

First , Designing interfaces using interface controls :

427effa113ac57ef239ed2a4cbdf5497.png

These controls are not dragged past . It is First click the left mouse button to select a control , Then in the design area Click the left mouse button to place the control .

then , Switch to code view and write code :

c009695f523549fdea969d91da07278c.png
import win.dlg.message;
import win.ui;
/*DSG{
    {*//*}}*/

//  Serial port list 
import sys.comPort;
var comPorts = sys.comPort.list();
mainForm.combobox.items = comPorts;
mainForm.combobox.selIndex = 1; 

import sio;
var sioPort;

//  Open the serial port 
mainForm.openBtn.oncommand = function(id,event){
 if(sioPort){
  sioPort.close();
 }
 
 var err;
 sioPort,err = sio.port(mainForm.combobox.selText);
 if(!sioPort){
  return mainForm.msgErr(err);
 }
 
 sioPort.ioctl(eval(mainForm.baudrateEdit.text),8,1);
 
 mainForm.msgOk(" Port opened ",1000)
}

//  Turn off the serial port 
mainForm.closeBtn.oncommand = function(id,event){
 if(sioPort){
  sioPort.close();
  mainForm.msgOk(" Port closed ",1000);
 }  
}

//  Lighting 
mainForm.ledonBtn.oncommand = function(id,event){
 if(!sioPort){
  mainForm.openBtn.oncommand();
 }
 
 if( !sioPort.writeHex("01") ){
  return mainForm.msgErr(" fail in send ");
 }
 else {
  return mainForm.msgOk(" send out ON success ",1000);
 } 
}

//  Lights out 
mainForm.ledoffBtn.oncommand = function(id,event){
 if(!sioPort){
  mainForm.openBtn.oncommand();
 }
 
 if( !sioPort.writeHex("00") ){
  return mainForm.msgErr(" fail in send ");
 }
 else {
  return mainForm.msgOk(" send out OFF success ",1000);
 } 
}

if(_ARGV.opt){
 mainForm.edit.print(_ARGV.opt,_ARGV[#_ARGV]);
}

mainForm.edit.oncommand = function(id,event){
 
}

mainForm.static.oncommand = function(id,event){
 
}

mainForm.static2.oncommand = function(id,event){
 
}

mainForm.show();
return win.loopMessage();

The code is relatively short , Everyone should understand .

function :

0617d417ed679554641ffdf087e42b76.png

test :

Program packaging :

9a55e20b096e2ac9aec1e9a46db7a5d1.png

Package and release the program , Just click this button , The generated executable does not depend on other files , A little strong ~

a5511f9c3802965e44eaafe6925339d3.png

You can see , Before comparison Understandability | Teach you to write your first upper computer In a word , Use aardio It's a lot easier to write this on the computer . Whether from the amount of code 、 step 、 Program packaging .

From the perspective of my writing : Write Understandability | Teach you to write your first upper computer This article took me nearly a week's spare time ; It took only two days of spare time to write this article , Including understanding 、 Study aardio Time for ~

aardio As a programming language , It has a certain grammar . Related examples :

44e93777435e86fd8e3e7db882b7de96.png

for example :

d6ad352ef5db2ce90f311a8344159e88.png

But I did C It should be easy for us to understand .

aardio It's also a glue language , It can embed many mainstream programming languages :

d9ffc9f883429d6e215dd38faedfdc27.png

aardio call C Language functions :

3b6a15800cdf778dde924cceca68caad.png

aardio Although it is mainly used in desktop software development , but aardio It also contains many other contents :

8ffb7c05fdace7a3658e1ac576998b2a.png

Each piece of content has a wealth of examples , Interested friends can read and learn by themselves .

In this article 、 Lower machine demo, You can reply to key words in the background of official account. :aardio , Can get .

If you find the article helpful , Please give me a favor 、 Collection 、 forward , thank you !

------------ END ------------

175a0f65e796adb081bdabf493ff5154.gif

● special column 《 Embedded tools

● special column 《 Embedded development 》

● special column 《Keil course 》

● Embedded column selection tutorial

Pay attention to the reply of the official account “ Add group ” Join the technical exchange group according to the rules , reply “1024” See more .

3a874a01f01244446cefa296bd8860ce.png

55794546001b3b6144e08918bb1976dd.png

Click on “ Read the original ” See more sharing .

版权声明
本文为[strongerHuang]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231423304514.html