当前位置:网站首页>Getting started alicloud haas510 open board DTU (version 2.0) --510-as
Getting started alicloud haas510 open board DTU (version 2.0) --510-as
2022-06-12 14:08:00 【TMS320VC5257H】
Abstract : Compared with haas600,haas The team launched haas510 It's cheaper , Within 100 yuan .2.0 Version than 1.0 The version layout is more reasonable ,USB、 Different hardware connectors are used for user serial port and debugging serial port , There will be no danger of MIS insertion . Alibaba cloud officials today provided professional instructions on a page , But some concepts are not easy for beginners to understand . This article uses the way of combining pictures and texts , Take you step by step and let your JavaScript Light applications run smoothly .
![]()

Hardware :haas510 v2.0( Silk screen HaaS 510-AS),USB Serial port module , Matching adapter line
Software :win7x64,amp,vscode,sscom
This article refers to the document link :
https://help.aliyun.com/document_detail/277467.html?spm=a2c4g.11186623.6.661.1e441a1fNiMqxd
1. Hardware wiring
As shown in the figure below , Use one USB The serial port is connected through the adapter cable provided in the kit .

Simplified wiring diagram , take MAIN UART And USB Serial port connection .MAIN UART It's pushing JavaScript Code , Used as a push interface , After the push , Can be used in the program as PORT2 Interface , That's the user interface , Use it as an ordinary serial port .

This wiring has 2 Objective , The first is to supply power to the development board , The power supply voltage of this board is 5V, The core module is moved away EC600S-CN, The power consumption is very small . So you can use it directly USB Serial port 5V Power supply .
haas510 What is provided on the development board is XH2.54 Standard connector for , Four corners are designed with screw holes , So it can be directly installed in your device shell to act as DTU modular .
2. download amp Tools
amp It means AliOS Things Mini Program (AMP).
It literally means Alibaba cloud Internet of things mini( light ) application , Software specially used for Alibaba cloud IOT hardware .
Its function is to JavaScript Program push to haas In the hardware device , There are many of these devices , Include haas510.
First download amp Tools , Find... Through the help documentation windows edition AMP Tools . Then click download .
Please note that ,AMP Tools are constantly being updated , The latest... Is recommended , Otherwise, it may cause the problem that the program cannot be burned .

The downloaded file is a compressed package , Next we need to unzip .
After decompression, there are two folders , This is different from the previous version , The previous version had only one APP Folder .

How to use this tool ? The answer is to use windows Command line tools .
Suppose we put this tool under the user folder
C:\Users\Administrator\amp-win
So the steps to use this tool are
Use cmd Command to open window Command line , Enter into your storage amp Folder for tools , Be careful ,amp Tools in dist Under the folder . To invoke this tool , Need cd Entering layer by layer dist Folder . We can go through dir Command to see if it really enters dist Folder . real dist The file directory should be as shown in the following figure .

It's time to push .
3. Make sure the hardware is working properly
Connect the circuit board to PC Of USB Interface , Start the serial port assistant , Reset the development board .
If the connection of the development board is normal , Then the serial port assistant will display RDY amp shakehand begin. That is, the development board is ready , Can pass amp The tool shook hands .

4. push JavaScript Program
haas A prominent feature of the series hardware is that it supports a variety of development methods , You can use c Language , Develop from the bottom .
haas One of the most obvious features is support for JavaScript and Python Two languages , Through the built-in engine of these two languages , bring haas Hardware can develop Internet of things applications through a very small amount of code . This will greatly improve the efficiency of developers .
Alibaba cloud haas The team calls this development approach “ Light application ”.
When we successfully downloaded amp Tools , After connecting the hardware , Let's start pushing “ Light application ” Program .

In success cd To dist After the folder, use the command :
amp seriallistYou can see the current serial port list , It's on my computer , It is COM52. So the display COM1 and COM3 What is it? ? It is the serial port equipment of the system , I don't care . How do beginners judge which serial port we are ?

The method to determine which serial port is is is to open the device manager interface , Pull out USB A serial port , Plug in , Observe which serial port is newly added .

Know your own USB After which serial port is it , You can use the following command , stay windows Push light applications in command line tools .
amp serialput app com52Enter after entering the command , Will return some information , The key message is “Please reboot board now”, mean , Please reset haas510 Development board . It is impossible to push without resetting .

Press the reset key in the red box ( stay 510 In the first edition , This button is not marked ).

then amp The tool starts pushing , And display the progress in the form of a simple progress bar .
Suppose we use the one we just downloaded amp The default code . The push speed is very fast .
amp The code provided with the tool is like this :
console.log('hello amp!');
console.log('amp version is: ' + system.version());
console.log('amp platform is: ' + system.platform());
console.log('amp heapTotal is: ' + system.memory().heapTotal);
console.log('amp heapUsed is: ' + system.memory().heapUsed);
Push complete

5. Observe the operation effect
amp The tool comes with this js The content of the program is very simple , Just send a few string messages , such as hello amp, There are also system version numbers and other information .
console.log('hello amp!');
console.log('amp version is: ' + system.version());
console.log('amp platform is: ' + system.platform());
console.log('amp heapTotal is: ' + system.memory().heapTotal);
console.log('amp heapUsed is: ' + system.memory().heapUsed);
What does this information look like ?
yes DEBUG UART, That is to debug the serial port .
How to connect ?
As shown in the figure below :

The actual wiring is shown in the figure below , Use... From the suite 3Pin Transfer through the transfer line . Then connect one by one 5V DuPont line power supply .

Reset the development board , Then observe through the serial port assistant . This article USES the sscom Serial port assistant . From a lot of debugging information , We can find this one that only runs once js Program output information .

Do you find it particularly troublesome to find these buried information . No problem , We can revise it .
6. Send messages regularly
Let's change the program , adopt VSCODE modify , It can also be done through VSCODE Self contained terminal replace windows Push with the built-in command line tool .

The source code is as follows , It can be copied with one click .
console.log('hello amp!');
console.log('amp version is: ' + system.version());
console.log('amp platform is: ' + system.platform());
console.log('amp heapTotal is: ' + system.memory().heapTotal);
console.log('amp heapUsed is: ' + system.memory().heapUsed);
setInterval(function () {
console.log('Hello World, time: ' + new Date());
}, 1000);The operation effect is shown in the figure below , In this way, we don't have to look for a few lines of debug output in a large section of debug information .

console.log In the debug js Programming is a very important method , In a program with a large number of lines of code , You can add this method at a key location , It is used to observe whether the process data is correct , This can help modify the optimizer .
边栏推荐
- atomic and exclusive operation
- SystemC learning materials
- Paw advanced user guide
- M1 pod install pod lint failure solution
- Simple implementation of gpuimage chain texture
- 公司运营中更注重转化的出价策略,如何实现? —Google sem
- Chapter IV expression
- Create a small root heap and judge the node relationship (also.C\u str() substr(),atoi(),string. Use of find())
- [semidrive source code analysis] [x9 chip startup process] 25 - Introduction to mailbox inter core communication mechanism (code analysis) rpmsg-ipcc RTOS & QNX
- [semidrive source code analysis] [x9 chip startup process] 26 - LK of R5 safetyos_ INIT_ LEVEL_ Target phase code flow analysis (TP drvier, audio server initialization)
猜你喜欢

Alibaba Cloud Development Board haas510 submission Device Properties

Axi4 increase burst / wrap burst/ fix burst and narrow transfer

Alicloud development board vscode development environment setup

Create a small root heap and judge the node relationship (also.C\u str() substr(),atoi(),string. Use of find())

Single bus temperature sensor 18B20 data on cloud (Alibaba cloud)

肝了一个月的原创小袁个人博客项目开源啦(博客基本功能都有,还包含后台管理)

【活动早知道】LiveVideoStack近期活动一览

TestEngine with ID ‘junit-vintage‘ failed to discover tests

How to realize the bidding strategy that pays more attention to transformation in the company's operation Google sem

618 entered the second half of the period, apple occupied the high-end market, and the domestic mobile phones finally undercut the price competition
随机推荐
Leetcode 2185. 统计包含给定前缀的字符串
My resume.
高考回忆录
If you want to build brand awareness, what bidding strategy can you choose?
3. Process concealment under the ring ----- continuous concealment and new opening prevention
Interview question 17.14 Minimum number of K (almost double hundreds)
Shell脚本到底是什么高大上的技术吗?
What is the default gateway
Alibaba cloud development board haas510 sends the serial port data to the Internet of things platform
Redis核心配置和高级数据类型
1414. minimum number of Fibonacci numbers with sum K
How to realize the bidding strategy that pays more attention to transformation in the company's operation Google sem
Dismantle and modify the advertising machine - Amateur decompression
Wait function in SystemC
初学者入门阿里云haas510开板式DTU(2.0版本)--510-AS
Dial up and Ethernet
Démontage et modification de la machine publicitaire - décompression amateur
【活动早知道】LiveVideoStack近期活动一览
阿里云开发板HaaS510响应UART串口指令
Hash tables, sets, maps, trees, heaps, and graphs