Pages: [1]   Go Down
Author Topic: arduino 12 compiled sketches keep resetting  (Read 551 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 221
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Initially with 012 I was unable to compile my sketches since I was using

#include <Servo.h>
#include <FrequencyTimer2.h>

Mem suggested:

Quote
A number of people have reported similar problems. I think its caused by including wiring.h in the header file.  In FrequencyTimer2.h, try replacing
#include <wiring.h>  
  with
#include <inttypes.h>

You may  need to to add
#include <wiring.h>  
 to the FrequencyTimer2.cpp file just after the  #include <FrequencyTimer2.h>

This fixed the compiling but now I get a new problem that the code keeps crashing or causing the arduino to reset at what seems like random times.

When I go back to using 011 there is no problem with the same code.

any clues?
Logged

London
Offline Offline
Tesla Member
***
Karma: 10
Posts: 6255
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't know if the ram usage on 0012 is different from 0011 but if you were on the edge then that could be the cause. See if you can reduce the number of strings or other memory hungry variables and see if that stabalizes things.
Logged

Lacomb, Oregon
Offline Offline
Sr. Member
****
Karma: 0
Posts: 302
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

When you compile the program what size does it report? Might be a clue.
Logged

Stephen

0
Offline Offline
Full Member
***
Karma: 0
Posts: 221
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am only using about 8k.

I switched back to 0011 for this project but since it uses I2C I decided to try and get 0012 working again since I have been having lot's of bugs with I2C and want to see if the newer library with 0012 works better.

However I am still having the issue of the program not working under 0012 but worked fine under 0011.
Logged

0
Offline Offline
Faraday Member
**
Karma: 8
Posts: 2526
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I am only using about 8k.
That would be program space, not RAM.  Program space (FLASH) is a go/nogo condition.  Running out of RAM is harder to detect, and depends on how the code behaves when it runs.

-j

Logged

Pages: [1]   Go Up
Jump to: