Loading...
  Show Posts
Pages: 1 ... 51 52 [53] 54 55 ... 78
781  Using Arduino / Installation & Troubleshooting / Re: Pins Are there ever enough on: March 27, 2012, 10:19:04 am
Quote
Master Writer/Slave Receiver and Master Reader/Slave Sender

exactly what they say.

one is a Master Writer or if viewed from the slave, a Slave Receiver

the other is the Master Reader or if viewed from the slave, a Slave Sender

the master and slave handle the protocol differently.
782  Using Arduino / LEDs and Multiplexing / Re: Up to 70 LEDs on one digital output on: March 26, 2012, 12:51:45 am
I am making a very similar circuit. Attaching 3 LEDs in parallel and uses 9 columns of these to make a 3x3x3 cube. Problem is I cannot attach individual resistors to each LED. Hence, is there a solution whereby I can use 1 resistor for every 3 LEDs in parallel, use a transistor to supply approx 60mA of current?

You might be able to get around this,
I use LED's a lot for de-bugging so I made it easier by cutting off the anode really close to the LED and carefully soldering a 1k resistor to the anode stump. ( trim one side of the resistor so you have just enough wire to solder. )

You could use this same method in your cube.
783  Development / Suggestions for the Arduino Project / Re: Found lousy boo-boo in arduino IDE generated compilation commands on: March 26, 2012, 12:21:43 am
Arduino is good but maybe it's my time to move my largish project to some better IDE.

I have had a good experience with the Arduino IDE, my project is currently 14 files long and 165kb in size and growing, the IDE has been able to handle it all. With access to the gcc command line I will have all I need. I have been meaning to contact you about your library in regards to a common serial interface for HW and SW systems ( you had a thread a while back I think ).
784  Development / Suggestions for the Arduino Project / Re: Found lousy boo-boo in arduino IDE generated compilation commands on: March 25, 2012, 11:12:20 pm
Quote
You could try using the mpide GUI to build the AVR sketches rather than the Arduino IDE.
I might give this a try, I would like to test some features of c++11 on the Arduino ( variadic templates, would revolutionize my library ).

On a side note, anyone read Italian and see the thread about upgrading the AVR system the IDE uses.
http://arduino.cc/forum/index.php/topic,96976.0.html

I might plug through it one day with Google translator.
785  Development / Suggestions for the Arduino Project / Re: Found lousy boo-boo in arduino IDE generated compilation commands on: March 25, 2012, 10:52:54 pm
This mildly frustrates me too, the reason you have to do this is because there is no option to add additional include directories ( As you have found ).

I have other needs when it comes to changing the command line call to gcc.
I have been thinking of writing a module for my server app that will intercept all the IDE's interaction with the file system, then modify the avr-gcc.exe call with my new parameters. If I continue the project I'll forward you the finished app.
786  Using Arduino / Project Guidance / Re: if..else HELP on: March 25, 2012, 06:11:41 pm
your code loops very fast maintaining the led power as the input is high, you need to modify it to say,

set a flag when the input starts high, turn on led, continue looping.
If input is still high, check time led has been on.
If on to long turn off led and wait for low input to reset.
if on too short, leave on and keep looping.

using millis and a few variables you can store timings and state flags.
787  Using Arduino / Programming Questions / Re: Explanation about Pointers on: March 22, 2012, 10:24:36 am
Rather than copying data you can pass a pointer to a block of memory, pointers can be used instead of passing via reference.
Traversing memory is very useful in certain situations, pointer arithmetic makes it easy.

You can cast the address of some location to a different type giving it completely different semantics.

Arrays are pointers in disguise / pointers are arrays in disguise.

Pointers can take away stability by allowing things like modifying const data and breaking protected and private encapsulation.

The concept of pointers can be hard, but very useful...
788  Using Arduino / Programming Questions / Re: Did I break It (Mega 2560) on: March 21, 2012, 10:54:32 pm
You should try fat16lib's digital pin library, it implements port manipulation for you and is very easy to use.

http://arduino.cc/forum/index.php/topic,86931.0.html
789  Using Arduino / Programming Questions / Re: Did I break It (Mega 2560) on: March 21, 2012, 10:49:30 pm
unplug everything from the arduino ( except USB ), then try upload an empty sketch.
depending on your LCD wiring, some damage could possibly occur under certain circumstances.

This is a fun read.
http://ruggedcircuits.com/html/ancp01.html
790  Using Arduino / Programming Questions / Re: Convert string to byte and back again on: March 21, 2012, 10:34:49 pm
No worries smiley
You should have a read through [this] when you have some spare time, the arrays section would clear up a few things.
791  Using Arduino / Programming Questions / Re: Convert string to byte and back again on: March 21, 2012, 09:42:20 pm
Quote
I was looking through the code and as the data string is stored only in frame_data[0]

frame_data[0] is a single element ( 1 byte long ),a string is a 'string' of elements.
792  Using Arduino / Programming Questions / Re: Convert string to byte and back again on: March 21, 2012, 08:37:08 pm
I think the output code is a little off, I may be wrong but, you use packet data as the number then only output one byte.

This uses the id for the number and loops through the 8 data bytes.

Code:
Serial.print("Packet Number: ");
Serial.println(frame_id);
Serial.print("Packet Data: ");

for( int i_Index = 0 ; i_Index < 8 ; ++i_Index ){

  Serial.write(frame_data[ i_Index ]);
  if( i_Index < 7 ) Serial.write(", ");
}
Serial.print("\n");
793  Using Arduino / Programming Questions / Re: Convert string to byte and back again on: March 21, 2012, 08:17:45 pm
Sorry, I don't have any knowledge on the CAN library. Make sure all the info you pass to the read function is correct.
CAN.readDATA_ff_0(&length,frame_data,&frame_id,&ext,&filter);

Quote
P.S. I just checked the value of data.length() and it has a value of 20 which is correct in this case.
You do a 'length = data.length();' on transmit side, does the length need to be known on the receiver side?

if frame_data is an array of chars, frame_data[0] will only output one character.
Hard to say as the code you left out is quite relevant it seems.
794  Using Arduino / Programming Questions / Re: Convert string to byte and back again on: March 21, 2012, 06:51:29 pm
No that won't work.
Read the serial documentation before assuming its functionality.
Especially the return values.

http://arduino.cc/en/Serial/Write 
http://arduino.cc/en/Serial/read

A string is essentially an expensive array of chars ( 8 bit bytes ), so you will probably find it easier just implementing your own array where you can access each element directly.
795  Using Arduino / Project Guidance / Re: Another new person! on: March 19, 2012, 08:14:42 am
There is probably a proper way to post code in this post but I don't know it. Just cut and paste?

When editing or creating a post use the '#' button above the smiley's

Code:
it will add 'code' tags to place your source in
Pages: 1 ... 51 52 [53] 54 55 ... 78