Loading...
  Show Posts
Pages: [1] 2 3 ... 7
1  Using Arduino / Programming Questions / Re: Array and pointers... Confused on: April 29, 2013, 06:12:45 pm
Awesome!!!
Got it working now smiley
Thanks a lot!!!
2  Using Arduino / Programming Questions / Array and pointers... Confused on: April 29, 2013, 03:16:52 pm
I'm getting confused on pointer and arrays and hopefully someone may shine some light.
I have the following arrays:
Code:

const prog_char array1[] PROGMEM ={0x00,0x01};
const prog_char array2[] PROGMEM ={0x00,0x01};
My function uses the array:
Code:
void test(const prog_char *iptr)
{
//Do something with iptr
}
Everything is well until here. I can call test(array1); and everything works as expected.
Now, I'd like to have an array like this:
Code:
const prog_char *myarray[] PROGMEM= {array1,array2};
How do I need to call my test() function and pass myarray[0] as argument?

Thanks in advance!!!
RI
3  Using Arduino / Programming Questions / Re: PROGMEM issues on: April 26, 2013, 06:38:29 pm
Oh wow... You are right!!!!
I missed that 2nd const.
Indeed the 2nd const did the trick.
Thanks a lot!!!
4  Using Arduino / Programming Questions / Re: PROGMEM issues on: April 26, 2013, 06:16:38 pm
Like I mentioned on 2nd post, it compiles fine on Windows and MacOSX.
Your 2nd code you posted is how I had it originally and we've been using that way for well over 2 years.
But I was trying to compile on a linux weezy and was not compiling until I removed the PROGMEM from the pointer array.
So, I my code became:
Code:
const char Menu_0_Label[]   PROGMEM = "test1";
const char  Menu_1_Label[]  PROGMEM = "test2";
const char * const menulabel_items[] = {Menu_0_Label,Menu_1_Label};
And that compiles fine now. Technically speaking, even if my pointer array doesn't go into flash, it won't take much ram memory anyway... It's just a pointer array after all, right?
5  Using Arduino / Programming Questions / Re: PROGMEM issues on: April 26, 2013, 05:17:52 pm
Fixed.
I guess it doesn't like the PROGMEM on the array declaration...
This works:
Code:
const char *menulabel_items[] = {Menu_0_Label,Menu_1_Label};
6  Using Arduino / Programming Questions / Re: PROGMEM issues on: April 26, 2013, 04:13:44 pm
Also, forgot to mention that this same library compiles just fine on Windows/MacOSX.
7  Using Arduino / Programming Questions / PROGMEM issues on: April 26, 2013, 04:12:23 pm
Hi,

I have a problem compiling codes on Arduino IDE 1.0.1 running on a Raspberry PI.
I'm getting this error:
variable 'menulabel_items' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
The problem is that the variable is already declared as const
Code:
const char *menulabel_items[] PROGMEM = {Menu_0_Label,Menu_1_Label};
Does anyone know why I'm getting this error and how to get around it?
8  Community / Website and Forum / eagle file for ethernet board on: September 14, 2012, 10:01:52 pm
I can't seem to download the ethernet board eagle files.
http://arduino.cc/en/uploads/Main/arduino-ethernet-reference-design.zip
Is it corrupt?
9  Using Arduino / Installation & Troubleshooting / Re: Arduino 1.01 and Norton Internet Security on: May 24, 2012, 09:44:00 am
Yes, but what in the new release that can cause it to act like a virus?
The previous release Arduino 1.0 runs just fine.
10  Using Arduino / Installation & Troubleshooting / Arduino 1.01 and Norton Internet Security on: May 23, 2012, 09:48:03 pm
I have Norton Internet Security and it deletes Arduino.exe that came on the package 1.01 I just downloaded.
Is anyone having this same problem?
11  Development / Other Software Development / Custom Tool on: April 04, 2012, 05:00:33 pm
Hi,

I recently stumbled upon the Mangler tool and decided to create one of my own.
I've been playing around with it and tested initially on processing.
While I was able to get the tool to work on processing, it gave me an error when I tried to use it on Arduino.
After further digging, it seems the pde.jar distributed with Arduino does not offer me the Base class - processing.app.Base - http://processing.googlecode.com/svn/trunk/processing/build/javadoc/everything/processing/app/Base.html
I was trying to get the base by using this line:
editor.getBase().handleOpenReplace(editor.getBase().getSketchbookFolder().getPath() + "/Test/Test.ino");
Is it correct or there is another way to get access the Base class?

Thank you,
RI
12  Using Arduino / Installation & Troubleshooting / Mega2560 and avrdude on: February 13, 2012, 04:34:06 pm
Hi,

When uploading to MEGA2560, avrdude keeps on infinite loop trying to find the board and never quits if the board is not found.
The message is:
avrdude: stk500_2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:

Is there any way for it to behave the same way as stk500v1 and Duemilanove, which is if it doesn't find, it retries only once and quits?

Thanks
13  Using Arduino / Programming Questions / Re: library definition on: January 13, 2012, 05:23:27 pm
It's worth the shot.
Thanks for trying though.
Here is the entire set of libraries: https://github.com/curtbinder/ReefAngel
14  Using Arduino / Programming Questions / Re: library definition on: January 13, 2012, 05:07:13 pm
Thanks for the explanation, but that won't work either.
I can't expect all users to use linux.
15  Using Arduino / Programming Questions / Re: library definition on: January 13, 2012, 04:49:36 pm
That's the problem I'm having right now.
We don't have a history track either. So, one could only know what the latest code had and not past changes on the features.h file.
Yes, each one of my libraries gets the include of the features.h file.
What is softlinks?
Pages: [1] 2 3 ... 7