Show Posts
Pages: [1] 2 3 ... 121
1  Using Arduino / Programming Questions / Re: How to find source of high .bss usage? on: Today at 03:51:56 am
Need your code or your .elf file

Otherwise there is a tool in the avr bin directory which you can use called avr-nm.

This is what I use to see a breakdown of the memory sections.
avr-nm.exe -n -S
2  Using Arduino / Programming Questions / Re: max payload ? on: Today at 03:13:03 am
I agree with @PaulS.

What 32 byte array?


Maximum payload size for NRF24l01 is 32 bytes.
3  Using Arduino / Programming Questions / Re: Strange error message on: Today at 01:07:24 am
Hi, had a test of your project. The results where... fine.

  • IDE 1.0.5
    • Uno: Binary sketch size: 28,316 bytes
    • Mega: Binary sketch size: 30,168 bytes
  • IDE 1.5.5 r2
    • Uno: Sketch uses 28,234 bytes (87%)
    • Mega: Sketch uses 29,970 bytes (11%)

The Uno versions use more than 2k ram, so will not work. But the point is, your error did not appear.
I'm downloading the new 1.5.6 to see if there is any difference, however my connection is stupidly slow today and its timed out once already.

The results for 1.5.6 r2 where the same:
Quote from: PoolController.ino
Sketch uses 28,872 bytes (11%) of program storage space. Maximum is 258,048 bytes.
Global variables use 2,159 bytes (26%) of dynamic memory, leaving 6,033 bytes for local variables. Maximum is 8,192 bytes.

The .hex & .elf are attached.
4  Development / Other Software Development / Re: I think I found a bug in the HardwareSerial.cpp Library. on: April 17, 2014, 11:28:06 pm
Looks like they where onto it. Some big changes to the source for 1.5.6.

The current source has been fixed.
void serialEventRun(void)
#if defined(HAVE_HWSERIAL0)
  if (Serial0_available && serialEvent && Serial0_available()) serialEvent();
#if defined(HAVE_HWSERIAL1)
  if (Serial1_available && serialEvent1 && Serial1_available()) serialEvent1();
#if defined(HAVE_HWSERIAL2)
  if (Serial2_available && serialEvent2 && Serial2_available()) serialEvent2();
#if defined(HAVE_HWSERIAL3)
  if (Serial3_available && serialEvent3 && Serial3_available()) serialEvent3();
5  Using Arduino / Programming Questions / Re: Switch and Case question on: April 16, 2014, 08:57:28 pm
What values do you see over serial. Or is the switch case not even entering?
6  Development / Suggestions for the Arduino Project / Re: Need mechanism to pass defines to library cpp files on: April 16, 2014, 08:30:55 pm
Yeh, this library works even on some of the small tiny avr's (2313), but only if none of the code for floating point is included since that brings in additional 'library' code that really bulks up an application.  However, for some applications, and on the appropriate chips, floating point random numbers can be very useful, so I want to include the capability in the library, but only if the user needs it...

I thought if you used some of a classes code, then all of it were included.
No overhead for unused data. To achieve what you want, no mods are needed.

The defines I provided hide them from the user. I use templates frequently, however they are overkill for this. The floating point data is compiled, but not linked in unless you use it. Which means there is no additional code impact if the user decides not to use it.

Also they work if the user wants, just like you wanted.
7  Development / Suggestions for the Arduino Project / Re: Need mechanism to pass defines to library cpp files on: April 16, 2014, 07:02:44 pm
What you want can be achieved, however is it necessary.

Do the new features add overhead even when unused?
Or will the methods have alternate functionality depending on the value of ENTROPY_FLOAT?

If you want the functions unavailable, you could simply add this to your header.
#define ENTROPY_FLOAT  //Include for compilation, sketch must define to use.

And modify the .cpp
#include <Arduino.h>
#include <Entropy.h>

This way, the library is compiled with full functionality, and the sketch will only see the float functions if they explicity add #define ENTROPY_FLOAT. The compiler should be able to remove the unused pieces.

If you want to prevent compiling of the float features altogether, that can still be achieved.
8  Using Arduino / Programming Questions / Re: multiple buttons on analog input on: April 16, 2014, 05:52:59 pm

ASCII code for "q"=81
ASCII code for "w"=119

I know what it means only because I googled but I still want the OP to put those comments in because I shouldn't have to remember what "119" means.

Can avoid the comment or confusion by simply putting the character in.

Code: 'w' );

Remember the single quotes though.
9  Using Arduino / Programming Questions / Re: Variable changed without code on: April 16, 2014, 04:23:50 pm
No comparison!

You are assigning 'not B' to A

B == 0 == FALSE
!B == TRUE

A is assigned TRUE and the if always succeeds.

A == !B

Or like tom said, the more intuitive version:
A != B
10  Development / Other Software Development / Re: New TFT Extension Library on: April 16, 2014, 03:57:43 pm
- smiley(mood);  // simplified -  yellow circle with some basic lines.

I've designed a manuscript with notes, however a smiley interface is not one I've thought of. Might inspire a chat program of sorts.

11  Development / Suggestions for the Arduino Project / Re: Arduino stickers on: April 16, 2014, 03:50:45 pm
You are allowed to produce non-commercial gear like t-shirts and stickers using the Arduino community logo.
The main Arduino logo is a trademark.
12  Development / Suggestions for the Arduino Project / Re: Need mechanism to pass defines to library cpp files on: April 16, 2014, 03:24:53 pm
Where is the source with the floating point functions in. I tried this one but  you must have a newer version.

EDIT: found the 0.72 version, no luck there either.
13  Using Arduino / Programming Questions / Re: Upload bigger than 28.800bytes does't complete? on: April 15, 2014, 08:50:27 pm
Pretty much all my clone Mega 2560's had this problem. Replacing the bootloader was the fix.

With regards to the bootloader, I'm not sure what the original one was, it just didn't work. Never had the problem on an Uno though ( rare for such a large sketch ). Either way replacing the bootloader can't hurt.
14  Using Arduino / Programming Questions / Re: Strange error message on: April 15, 2014, 08:24:02 pm
Zipping it up would be good. I would like to recreate the error to have a look.
15  Using Arduino / Programming Questions / Re: Strange error message on: April 15, 2014, 12:44:10 pm
It appears that internal interrupts require extra help, but interrupts using attachInterrpt should be straight forward.

extern "C"{
  __attribute__ ((section (".text"))) void __vector_9();

void setup(){

void loop(){

ISR(PCINT0_vect){    //This is __vector_9
Pages: [1] 2 3 ... 121