Sketch uses 20024 bytes (69%) of program storage space. Maximum is 28672 bytes.Global variables use 898 bytes (35%) of dynamic memory, leaving 1662 bytes for local variables. Maximum is 2560 bytes.
but the nybble.ino still says
Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.Error compiling for board Arduino Leonardo.
Then I compiled the original Nybble.ino on leonardo and pro mini.
Leonardo: Sketch uses 30366 bytes (105%) of program storage space. Maximum is 28672 bytes.Pro mini: Sketch uses 27676 bytes (90%) of program storage space. Maximum is 30720 bytes.
If the compiled hex file was the same as on Pro mini, it should fit in Arduino Leonardo. However it turned out to be larger on Leonardo. So it seems impossible to fit the original sketch in Arduino Leonardo.
So I further shrunk the code by removing more skills in Instinct.h
and removed the balancing algorithm in OpenCat.h by commenting out GYRO
//board configuration#define IR_RECIEVER 5 // Signal Pin of IR receiver to Arduino Digital Pin 5#define BUZZER 4//#define GYRO#define ULTRA_SOUND#define BATT A0
Now Nybble.ino compiles with:
Sketch uses 27080 bytes (94%) of program storage space. Maximum is 28672 bytes.Global variables use 1052 bytes (41%) of dynamic memory, leaving 1508 bytes for local variables. Maximum is 2560 bytes.
There might be other problems in your circuit connections. But at least the code can be uploaded now.
I wouldn't have as much patience as Li. :-)
and can you please explain how instinct.h works? and how does it move/connect to pca9685? becuase i cannot find a good tutorial,
then how can i:
1.test if the servo is broken
2. test if the arduino is wrong
3. test if the pca9685 is wrong
@Rongzhong Li
this is what im talking about
You need to connect 7.4V batteries. Tiny button batteries won’t work.
im..... lost.........
help.....
28000mAh in a 14500?! Apparently fake.
sooo.... when i switched from pro micro to nano, this happens, why?
and if you noticed i used a cr2032 because it has 3v each,
please help me with this problem........
may i ask you, what's the difference between the first one and the rest?
#define PT(s) Serial.print(s) //makes life easier #define PTL(s) Serial.println(s) #define PTF(s) Serial.print(F(s))//trade flash memory for dynamic memory with F() function #define PTLF(s) Serial.println(F(s))
PT and PTLF are defined in OpenCat.h
The baudrate setting should be 57600, or match your serial monitor.
It MUST use external batteries to power servos' movement.
3.7V 14500 Li-ion battery without protection. Not regular AA.
Check this thread.
and why wont it move?
like at all
so i tried to download arduino on my mac, because you have it on mac.
then theres this problem in nybble.ino
exit status 1 WriteInstinct/OpenCat.h: No such file or directory
even with your instinct.h cofiguration
#define NyBoard_V0_1 #define NYBBLE #define NUM_SKILLS 6 //#define I2C_EEPROM ... ... #if !defined(MAIN_SKETCH) || !defined(I2C_EEPROM) const char* skillNameWithType[]={"crN","balanceN","calibN","restN","sitN","sleepN",}; const char* progmemPointer[] = {cr, balance, calib, rest, sit, sleep,}; #else const char* progmemPointer[] = {cr, balance, calib, rest, sit, sleep,}; #endif
the nybble.ino still says sketch to big
please email me your code so i can try it
umm... this is not supposed to happen, is it?
instinct.h
#define NyBoard_V0_1 #define NYBBLE #define NUM_SKILLS 4 //#define I2C_EEPROM const char wk[] PROGMEM = { 43, 0, 0, 12, 59,-55,-49, 23, 24, -2,-12, 15, 59,-63,-47, 22, 27, -8,-11, 18, 59,-67,-45, 20, 30,-20,-11, 21, 59,-66,-43, 18, 34,-33,-10, 24, 59,-64,-40, 16, 38,-37,-10, 27, 58,-62,-37, 15, 43,-41,-11, 30, 57,-60,-35, 13, 47,-45,-12, 32, 58,-57,-32, 13, 47,-48,-13, 35, 60,-57,-29, 12, 45,-47,-14, 38, 62,-58,-26, 12, 41,-42,-15, 40, 65,-59,-23, 11, 36,-37,-16, 43, 66,-59,-20, 11, 32,-33,-18, 45, 67,-59,-17, 11, 18,-30,-20, 47, 62,-59,-14, 11, 7,-26,-22, 49, 53,-59,-12, 12, 1,-24,-24, 51, 40,-58,-12, 13, 2,-21,-22, 52, 26,-57,-12, 14, 7,-19,-20, 54, 17,-55,-14, 15, 13,-18,-16, 55, 15,-54,-16, 17, 16,-16,-15, 57, 13,-53,-23, 18, 19,-15, -9, 58, 12,-51,-38, 21, 22,-13, -2, 58, 12,-49,-51, 23, 24,-12, -1, 59, 13,-47,-60, 26, 23,-11, -6, 59, 17,-45,-66, 29, 20,-11,-15, 59, 20,-43,-66, 32, 18,-10,-33, 59, 23,-41,-65, 37, 17,-10,-35, 58, 26,-38,-63, 41, 15,-11,-40, 57, 29,-35,-61, 46, 14,-12,-44, 58, 32,-33,-58, 47, 13,-13,-47, 59, 34,-30,-57, 47, 12,-14,-48, 61, 37,-27,-58, 43, 12,-15,-43, 64, 40,-24,-59, 38, 11,-16,-38, 65, 42,-21,-59, 34, 11,-17,-34, 67, 44,-18,-59, 23, 11,-19,-31, 64, 46,-15,-59, 10, 11,-21,-27, 56, 48,-12,-59, 3, 12,-23,-24, 45, 50,-12,-58, 1, 13,-23,-22, 31, 52,-12,-57, 5, 14,-20,-19, 18, 53,-14,-56, 13, 15,-17,-17, 16, 55,-16,-55, 15, 17,-15,-16, 14, 57,-18,-53, 17, 17,-13,-15, 12, 57,-33,-52, 21, 20, -4,-14, 12, 58,-47,-50, 23, 22, 0,-13, }; const char sleep[] PROGMEM = { 1, 0, 0, -10,-100, 0, 0, -5, -5, 3, 3, 80, 80,-80,-80,-55,-55, 55, 55,}; const char rest[] PROGMEM = { 1, 0, 0, -30,-80,-45, 0, -3, -3, 3, 3, 60, 60,-60,-60,-45,-45, 45, 45,}; const char calib[] PROGMEM = { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,}; #if !defined(MAIN_SKETCH) || !defined(I2C_EEPROM) const char* skillNameWithType[]={"wkN","sleepN","restN","calibN",}; const char* progmemPointer[] = {wk, sleep, rest, calib,}; #else const char* progmemPointer[] = {wk, sleep, rest, calib,}; #endif
verify
Sketch uses 20024 bytes (69%) of program storage space. Maximum is 28672 bytes. Global variables use 898 bytes (35%) of dynamic memory, leaving 1662 bytes for local variables. Maximum is 2560 bytes.
but the nybble.ino still says
Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it. Error compiling for board Arduino Leonardo.
The 6 in "#define NUM_SKILLS 6" should match the number of elements in the skill lists.
Remove wkL, wkR to reduce the code size.
"hi" needs skill "hi2" to complete the behavior loop.
"calibN","restN","sleepN" must be included for proper starting up.
You also need to comment out GYRO in OpenCat.h. See my previous comment.
I've received your codes.You haven't updated the header part in Instinct.h
#define NyBoard_V0_1 #define NYBBLE #define NUM_SKILLS 43 #define I2C_EEPROM
should be
#define NyBoard_V0_1 #define NYBBLE #define NUM_SKILLS 10 //#define I2C_EEPROM
Then I compiled the original Nybble.ino on leonardo and pro mini.
Leonardo: Sketch uses 30366 bytes (105%) of program storage space. Maximum is 28672 bytes. Pro mini: Sketch uses 27676 bytes (90%) of program storage space. Maximum is 30720 bytes.
If the compiled hex file was the same as on Pro mini, it should fit in Arduino Leonardo. However it turned out to be larger on Leonardo. So it seems impossible to fit the original sketch in Arduino Leonardo.
So I further shrunk the code by removing more skills in Instinct.h
#define NyBoard_V0_1 #define NYBBLE #define NUM_SKILLS 6 //#define I2C_EEPROM ... ... #if !defined(MAIN_SKETCH) || !defined(I2C_EEPROM) const char* skillNameWithType[]={"crN","balanceN","calibN","restN","sitN","sleepN",}; const char* progmemPointer[] = {cr, balance, calib, rest, sit, sleep,}; #else const char* progmemPointer[] = {cr, balance, calib, rest, sit, sleep,}; #endif
and removed the balancing algorithm in OpenCat.h by commenting out GYRO
//board configuration #define IR_RECIEVER 5 // Signal Pin of IR receiver to Arduino Digital Pin 5 #define BUZZER 4 //#define GYRO #define ULTRA_SOUND #define BATT A0
Now Nybble.ino compiles with:
Sketch uses 27080 bytes (94%) of program storage space. Maximum is 28672 bytes. Global variables use 1052 bytes (41%) of dynamic memory, leaving 1508 bytes for local variables. Maximum is 2560 bytes.
There might be other problems in your circuit connections. But at least the code can be uploaded now.
@Rongzhong Li what i wanna do is, at least make basic movements work. like walk forward, backward, turn left, turn right, and include hi if possible.
BTW, which movement is turn left, right, and walk backward? and what is the difference between crR, crL and wkR, wkL?