Show Posts
Pages: 1 2 [3] 4 5 ... 7
31  Using Arduino / Programming Questions / Using i/o via an array on: December 20, 2012, 01:34:56 pm
I'm trying to get my head around arrays in C.

I can do the following as to assign i/o pins via an array
int pins [6] = { 3, 5, 7, 10, 12, 13 }

However, can I assign a name to a pin and then use it in the array

const int Button1 = 3;
int pins [6] = { Button1, 5, 7, 10, 12, 13 }

thanks for any clarification

K
32  Products / Arduino Due / Re: More ideas for new Arduino DUE compatible board on: December 17, 2012, 01:54:05 am
The LED on pin 13 is most useful at times, especially during debugging, so it would be wise to leave it, IMHO.
K
33  Products / Arduino Due / Re: FreeRTOS for Due, Teensy 3.0 and AVR Arduinos on: December 16, 2012, 02:51:24 pm
Thanks a bunch :-)
34  Products / Arduino Due / Quadrature encoder on: December 12, 2012, 01:16:58 am
Anyone got a Quadrature encoder up and running on the Due ?
Can you share the setup ?
The tables and the timer (TC) are somewhat bewildering to me and I cannot find any examples on Atmels website for the SAM3X chip that shows any source code

Cheers
K
35  Products / Arduino Due / Re: Due External Interrupts on: December 07, 2012, 03:32:11 pm
Might be worth to try it with a SR Latch on the input.
This way it would eliminate any input issues
36  Products / Arduino Due / Re: Due External Interrupts on: December 06, 2012, 07:41:07 pm
You properly should not do anything like serial.print inside the ISR.
Just set a flag and print elsewhere.
I think print is buffered or something as the code locks up on a mega when triggering the interrupt.

37  Products / Arduino Due / Re: Due External Interrupts on: December 05, 2012, 01:50:51 pm
On the 8bit Arduino boards I have, the firmware appears to be doing something strange at each startup, so could be tied up with that.
I will try to run your code on another board when I get home tonight.
38  Products / Arduino Due / Re: Due External Interrupts on: December 05, 2012, 01:36:33 am
I haven't got a Due board, so Im guessing.

Is the 2.5V well within the specs for a high ?, maybe try 3V

Are the other pins floating, try tying high or low

Have you tried on another board, ie 8 bit, whats the result ?

Also on the output shown, is that without pressing the button at all ? like never pressing the button
39  Using Arduino / Programming Questions / Re: How to fit a variable in a fixed position in ram on: December 05, 2012, 01:35:21 am
Just really my lack of knowledge of C, but its improving heaps

Thanks
40  Using Arduino / Programming Questions / Re: How to fit a variable in a fixed position in ram on: December 05, 2012, 12:29:45 am
Main reason is debugging really, dump 50 bytes etc., but also after speed, tho with the 32bit Due this is probably not going to be much of an issue.
But you are right, I do get flashbacks, lots at times.

Do I have to do it in Assembly or can this be done in C ?
41  Using Arduino / Programming Questions / How to fit a variable in a fixed position in ram on: December 05, 2012, 12:03:15 am
How do I assign variables to a fixed location in ram in C ?

I have a quite a few variables declared as static and what I would like to do is to place these variables in a set order and then later send these via serial in a set order by starting a ram address xx

Or should I just let the compiler take care of this ?

Ta

Kim

42  Using Arduino / Programming Questions / Re: The HATRED for String objects - "To String, or not to String" on: November 22, 2012, 01:49:44 pm
Thanks

Coming from Assembly and a bit of basic, I'm trying to get my head around the GNU C compiler and the way it does things.
Been reading the GNU documentation, but sometimes it is "clear as mud" :-)

K
43  Using Arduino / Programming Questions / Re: The HATRED for String objects - "To String, or not to String" on: November 22, 2012, 03:43:37 am
Interesting and thank for clarifying this.

One question tho

When allocation static memory does that automatically become a global variable ?

Kim
44  Using Arduino / Motors, Mechanics, and Power / Great Motor Tutorial on Youtube on: November 13, 2012, 11:03:53 pm
There is a great tutorial on youtube which explains all the basic operations of the DC Motor.



45  Products / Arduino Due / Re: Building a CAN communication protocol interface for Arduino DUE on: November 13, 2012, 02:05:37 am
I think its important that the Library be made so it can run as a background task in a scheduler.
Also that the auto transmit messaging be selected to be optional as sometimes you don't want it to keep transmitting.

K
Pages: 1 2 [3] 4 5 ... 7