Article From:  







Now light it up, say ha, it’s been a long time, I don’t know which version of the library everybody is using.    I went to download the latest one officially.



I’ll use what’s in it.



Personally, I’m used to using this.



 Look at the official demo.














 Now just modify test. Lua




 Now let’s look at pins. Lua to see what to do next. Anyway, I predict that controlling GPIO is to configure the direction first, and then set the high and low levels, because I am familiar with the MCU.

Almost all single-chip computers are in this mode.

Let’s go and look for it.

 So I went to API.




 Then set the output level.


Here we go.

So the program is


Function name: printFunction: Print interface, all prints in this file will be prefixed with testParameter: NoneReturn value: None]]Local function print (...)_G.print ("test",...)




 Now download it.






 Close now, download after modification



 Do you know how to load files?

main.luaIt is necessary to load main.lua internally by default.

Then put the files you need to load in main. lua. Loading is done with require “file name”


 Then when you do some functions by yourself, you add the Lib support files for whatever functions you use.

Assuming that I need to acquire signal quality, then I need net.



Data link

Link: password: p9qs

If the link of the source code of the basic course is invalid, please download it in the introduction of Taobao. Because the link is still invalid, please contact the seller. Thank you. 


Leave a Reply

Your email address will not be published. Required fields are marked *