Post topics, source code that relate to the Arduino Platform

User avatar
By Anand Lobo
#25354 So, I'm doing this.
After going over the solar tracker code by Gabriel, I noticed there is little to no dependency on AVR-specific code. So, I basically went through all of the files in his program (download here) and took out references to BigNumber library. I replaced the sun-calculation code with this double-precision calculation code which appears to be accurate. I also tried to fix the EEPROM code syntax, as there are a couple of extra commands needed for the ESP8266.

Basically I'm lazy, and don't want to have to rewrite his entire program. So, this is a shortcut ... and I'm hoping one that can be fixed. If not ... well, there's always the hard way of actually doing the work.

End result: it compiles, no errors. It also uploads to my ESP-12E board. BUT.
As soon as it runs, it crashes and throws up a stack trace .... which I have no idea how to interpret.

Code: Select allTime: 13:0:0 on 1 8 2015
Sun's Alt: 78.011
Sun's Az: 105.103
Number of Machines 1
Machine Number 0
Resetting
Machine on: 0
limit detected
Up to here, this is expected output. Below is what I need help with.
Code: Select allctx: cont
sp: 3ffea1d0 end: 3ffea560 offset: 01b0

>>>stack>>>
3ffea380:  000002cb 447330cf 447330cf 40202754 
3ffea390:  41200000 45b27800 0000000c 45327000 
3ffea3a0:  0000164f 000003cc 3ff00000 00000341 
3ffea3b0:  3ffea5b8 00000000 3ffea3de bf800000 
3ffea3c0:  00000002 c0b64f1c 00000000 402035b0 
3ffea3d0:  ffffffff 7f464f1c 3ffea5b8 30205b95 
3ffea3e0:  71c71c72 c0b64f1c 71c71c72 40203ba0 
3ffea3f0:  c4008000 0000000b 3ffe8d86 00000000 
3ffea400:  00000001 00000001 3ffea5b8 00000000 
3ffea410:  3f800000 43c80000 c1200000 40203bf9 
3ffea420:  3ffe8d7b 3ffe93e8 3ffea5b8 4020a42c 
3ffea430:  00000000 00000000 3ffea5b8 4020a5e9 
3ffea440:  a0379200 3ffea5b8 00000000 00000000 
3ffea450:  00000001 3ffe93e8 3ffe93f0 40203dec 
3ffea460:  00000000 bf800000 c2b40000 43c80000 
3ffea470:  00000000 00000000 00000000 00000000 
3ffea480:  3ffea5b8 00000001 3ffea5b8 40205b95 
3ffea490:  3ffe9524 4010169f 43c80000 00000000 
3ffea4a0:  3ffea5b8 00000001 40202096 3ffe9540 
3ffea4b0:  40201b2e 00000032 3ffea5b8 3ffe9394 
3ffea4c0:  40233d74 3ffe93e8 3ffe93f0 40205584 
3ffea4d0:  3f800000 00000000 00000000 00000000 
3ffea4e0:  00000000 c1200000 43c80000 bf800000 
3ffea4f0:  00000000 00000000 00000000 00000000 
3ffea500:  c2b40000 c2b40000 c1200000 43200000 
3ffea510:  42f00000 3ffea5b8 3ffea5b8 4020a5e9 
3ffea520:  3ffe93a4 3ffe93a8 3ffe9398 00000002 
3ffea530:  3fffdc20 00000000 3ffea584 3ffea58c 
3ffea540:  3fffdc20 00000000 3ffea584 40202112 
3ffea550:  00000000 00000000 3ffe9540 40100118 
<<<stack<<<

 ets Jan  8 2013,rst cause:2, boot mode:(3,7)

load 0x4010f000, len 1264, room 16
tail 0
chksum 0x42
csum 0x42
~ld