342 views|2 replies

1455

Posts

1

Resources
The OP
 

[K230 Embedded AI Development Board Review] +RTC Timing and File Reading and Writing Applications [Copy link]

 

RTC timing and file reading and writing functions are important in subsequent AI recognition applications, so the two are studied and tested together.

Before introducing this aspect, let me first talk about an interesting phenomenon. After burning the image, the K230 development board will store two directories in the virtual U disk. The contents are as follows:

Among them, some corresponding Python routines will be stored in the app directory, and can be called and run in CanMV IDE.

Figure 1 Virtual disk routine

Taking the RTC routine as an example, its operation process is shown in Figures 2 and 3.

Figure 2 Reading routine

Figure 3 Test routine

Through this test, we can find that the RTC data here is used in the form of an array.

When a loop structure is added, the RTC timing value can be dynamically output through the coordination of the delay function, as shown in Figures 4 and 5.

Figure 4 Program content

Figure 5: Operation effect

From the output results, we can find that the output format of the data is quite different from our daily format. So how can we transform it into the daily format?

As mentioned before, the RTC data is organized in an array, so different time values can be read through different array subscripts.

Through the program shown in Figure 6, we can get the output form we need.

Figure 6 Procedure and effect

In this way, time management and record keeping will meet actual needs and requirements.

The K230 development board also provides file reading and writing functions, and saves files to the SD card.

The program and running results for realizing the file reading and writing functions are shown in Figures 7 and 8.

Figure 7 Procedure and effect

Figure 8 File and content

However, when reading and writing multiple lines, the reading and writing program needs to be modified to the content shown in Figure 9.

Figure 9 Read and write by row

If the collected data is to be recorded in a file, the RTC function must be coordinated. The procedure for recording data marks is shown in FIG10 , and the recorded data content is shown in FIG11 .

Figure 10 Recording procedure

Figure 11 Record content

In this way, we have the function of recording and saving detection data on the K230 development board, which will later serve the corresponding AI vision applications.

This post is from Domestic Chip Exchange

Latest reply

There are some corresponding Python routines stored in the app directory, which are useful.   Details Published on 2024-10-27 09:15
 
 

6587

Posts

0

Resources
2
 

There are some corresponding Python routines stored in the app directory, which are useful.

This post is from Domestic Chip Exchange

Comments

Yes, I just realized that’s the case.  Details Published on 2024-10-27 09:32
 
 
 

1455

Posts

1

Resources
3
 
Jacktang posted on 2024-10-27 09:15 Some corresponding Python routines will be stored in the app directory, which turns out to be useful

Yes, I just realized that’s the case.

This post is from Domestic Chip Exchange
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Related articles more>>

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list