|
781
|
Using Arduino / Installation & Troubleshooting / Re: Pins Are there ever enough
|
on: March 27, 2012, 10:19:04 am
|
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 ).
|
|
|
|
|
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...
|
|
|
|
|
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. 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); 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.
|
|
|
|
|
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 it will add 'code' tags to place your source in
|
|
|
|
|