mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
29 lines
782 B
C
29 lines
782 B
C
/* ******************************** */
|
|
/* Warning! Don't modify this file! */
|
|
/* ******************************** */
|
|
#include "PikaMain.h"
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
PikaObj * pikaScriptInit(){
|
|
PikaObj * pikaMain = newRootObj("pikaMain", New_PikaMain);
|
|
obj_run(pikaMain,
|
|
"\n"
|
|
"led = Device.LED()\n"
|
|
"uart = Device.Uart()\n"
|
|
"mem = PikaStdLib.MemChecker()\n"
|
|
"\n"
|
|
"print('hello wrold')\n"
|
|
"uart.setName('com1')\n"
|
|
"uart.send('My name is:')\n"
|
|
"uart.printName()\n"
|
|
"print('mem used max:')\n"
|
|
"mem.max()\n"
|
|
"print('mem used now:')\n"
|
|
"mem.now()\n"
|
|
"\n"
|
|
"\n");
|
|
return pikaMain;
|
|
}
|
|
|