I am also having difficulty using the LOAD command.
I have top level program (/Load_Program.bas) which calls a lower level program (/uploads/toggle_LED.bas)
Both programs are shown below:
'****************************************************************
'* Name : Load_Program.bas *
'* Author : B. Phillips *
'* Notice : Copyright (c) 2016 *
'* : All Rights Reserved *
'* Date : 03-02-17 *
'* Version : 1.0 *
'* Notes : Test program to try methods of loading a basic *
'* : program on nodeMCU using ESP Basic (V3a65) *
'****************************************************************
memclear
button "Load Toggle", [Toggle]
wait
[Toggle]
load "/uploads/toggle_LED.bas"
wait
end
'****************************************************************
'* Name : toggle_LED.bas *
'* Author : B. Phillips *
'* Notice : Copyright (c) 2016 *
'* : All Rights Reserved *
'* Date : 27/12/2016 *
'* Version : 1.0 *
'* Notes : Simple program to toggle the blue LED on GPIO16 *
'* : of nodeMCU using ESP Basic (V3a65) *
'****************************************************************
let led_pin = 16 ' Assign onboard blue gpio16 to led
let led_state = 1 ' Create a variable for remembering on/off condition of led
timer 1000, [toggle_led] ' Set timed interrupt to periodically toggle led
wait
[toggle_led]
if led_state = 1 then
led_state = 0
else
led_state = 1
end if ' Toggles LED state
io(po, led_pin, led_state)
wait
end
All goes well when I run the "Load_Program" until I hit the "Load Toggle" button. The Debug screen shows that it is loading the "/uploads/toggle_LED.bas" program but the nodeMCE module reboots and I am back to square one!
0 winsock connected 192.168.4.2
Loading . . . . /uploads/toggle_LED.bas
Exception (29):
epc1=0x4000c118 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
ctx: cont
sp: 3fff2fb0 end: 3fff34a0 offset: 01a0
>>>stack>>>
3fff3150: 00000010 3fff31c0 3fff15b8 4020ac01
3fff3160: 00000000 00000000 00000000 4022bac5
3fff3170: 3fff8c9c 00000000 3fff31c0 4022b8fb
3fff3180: 3fff246c 00000853 00000000 4022c258
3fff3190: 00000000 3fff15b8 3fff3214 4022b92d
3fff31a0: 3fff1c0c 3fff15b8 3fff1540 00001379
3fff31b0: 3fff1c0c 3fff15b8 3fff1540 4020e95d
3fff31c0: 3fff819c 0000000f 0000000c 3fff246c
3fff31d0: 00000000 00000000 3ffe9f28 00000000
3fff31e0: 000003e8 000e0099 3fff84dc 3fff451c
3fff31f0: 00000000 00000000 00000000 3fff3260
3fff3200: 00000020 3fff32d8 3fff32d8 4022b8ac
3fff3210: 3fff82e4 3fff8c9c 0000006f 0000000c
3fff3220: 3fff8574 0000006f 0000000c 402203ac
3fff3230: 00000000 00000000 3fff32d8 4022ba34
3fff3240: 00000000 3fff08c8 00000000 3fff3260
3fff3250: 00000000 3fff08c8 00000000 40219d7e
3fff3260: 3fff854c 0000001f 00000019 3fff81b4
3fff3270: 0000000f 00000000 3fff81cc 0000000f
3fff3280: 00000000 3fff81e4 0000000f 00000000
3fff3290: 3fff83fc 0000000f 00000000 3fff8414
3fff32a0: 0000000f 00000000 3fff842c 0000000f
3fff32b0: 00000000 3fff8444 0000000f 00000000
3fff32c0: 3fff845c 0000000f 00000000 3fff8474
3fff32d0: 0000000f 00000000 3fff848c 0000001f
3fff32e0: 00000017 00000000 00000000 00000000
3fff32f0: 00000000 00000000 00000000 3fff246c
3fff3300: 00000010 3fff3390 00000000 4010053d
3fff3310: 3fff572c 3fff3390 3fff3390 4022b8ac
3fff3320: 00000010 00000001 3fff3390 3ffeff30
3fff3330: 00000010 3fff3390 3fff3390 4022b8ac
3fff3340: 3ffe8e2c 00000000 3fff3390 3fff246c
3fff3350: 3fff8184 0000000f 00000000 3fff44e4
3fff3360: 0000000f 00000000 3fff44cc 0000000f
3fff3370: 00000000 3fff5374 0000000f 00000000
3fff3380: 3fff8524 0000001f 00000017 3fff49cc
3fff3390: 0000000f 00000004 3fff33ec 4022b8fb
3fff33a0: 00000000 000000b9 00000000 00000000
3fff33b0: 3fffdad0 3fff1340 3fff33e0 4010068c
3fff33c0: 00000000 3fff1340 3fff1c10 3fff2478
3fff33d0: 3fffdad0 3fff1340 3fff1c10 4021b91b
3fff33e0: 00000000 00000000 00000000 00000000
3fff33f0: 00000000 00000000 3fff0858 402082c8
3fff3400: 00000001 000e0005 00000000 4021bb7b
3fff3410: 00000000 3fff3430 3fff5dd0 4021ff7c
3fff3420: 00000001 00000000 3fff2480 00000000
3fff3430: 3fffdad0 3fff2478 40229628 3fff2480
3fff3440: 00000000 00000000 00000000 3fff2478
3fff3450: 3fffdad0 00000000 3fff2470 4021bc0b
3fff3460: 00000000 feefeffe feefeffe feefeffe
3fff3470: 00000000 00000000 00000001 40229649
3fff3480: 3fffdad0 00000000 3fff2470 40229674
3fff3490: feefeffe feefeffe 3fff2480 40100718
<<<stack<<<
º¡rþŽ$þHTTP Port: 80
ESP Basic 3.0.Alpha 65
MAC: A2:20:A6:00:73:B3
1
2
3
4
5
6
7
8
9
10
11
12
Failed Wifi Connect
Creating WIFI access point
ESPA2:20:A6:00:73:B3
APname
APpass
Any clues as to what might be going wrong?
The application of the LOAD command is the stepping stone to a much larger program configuration - without it I am really screwed
Cheers
Barry
VK2XBP