Show Posts
Pages: 1 ... 26 27 [28] 29 30 ... 85
406  Using Arduino / Programming Questions / Re: 24X6 Led Matrix works BUT I want to add animations also. Need help!! on: October 11, 2013, 10:31:48 am
Ok then, good luck with your project.
407  Using Arduino / Storage / Re: Reading/writing struct to sd card on: October 11, 2013, 04:31:08 am
There is no = as per the error message. Think about what the function is doing. It is filling the memory from the SD card, so why are you needing to assign anything? Also, look at the function documentation to see what the return value  is.  People who write libraries document stuff so you can us their libraries more easily, but you do need to make the effort to read up on it to make sure you are using it properly.
408  Using Arduino / Storage / Re: Reading/writing struct to sd card on: October 11, 2013, 02:08:57 am
Most good libraries have a block read as well, to match the block write. In this case you will need to use a loop to read all the data in one byte at a time. Set a uint8_t pointer to the address of the data/struct and then for each byte you read, assign it to the 'pointed' location and increment the pointer, repeat.
409  Using Arduino / Programming Questions / Re: 24X6 Led Matrix works BUT I want to add animations also. Need help!! on: October 11, 2013, 01:59:01 am
Here's some guidance:

You need to think of the LEDs as pixels on a display and write a function that will turn on and off one pixel. To do this you need to decide where the origin (0,0) of the matrix is and then when the function to turn on pixel (x,y) you can do a translation of what that means for your hardware (ie, you need to control something to make it happen). Once you can do that, the rest is easy. You can write functions to do vertical, horizontal, arbitrary lines, circles, etc, because all they are is points turning on and off.

Bouncing balls are a pixel turned on, wait some time, pixel off and next pixel on (in the direction of travel), wait, etc. Edge detection changes the direction of the coordinate that goes out of boundary (ie, if we were adding one we now subtract one to the coordinate).

The MD_MAX72xx library in my repository (below) implements these sorts of function in a different situation, so you may be able to see what I have done there (not beginner code though).
410  Using Arduino / Storage / Re: Reading/writing struct to sd card on: October 11, 2013, 01:27:31 am
The SD library does have a block write function, pretty much like in my first reply. Extract from the library online manual:

file.write(buf, len)

file: an instance of the File class (returned by
data: the byte, char, or string (char *) to write
buf: an array of characters or bytes
len: the number of elements in buf

Using this method would be more efficient and faster, as you do it all in one statement.
411  Using Arduino / Storage / Re: Reading/writing struct to sd card on: October 10, 2013, 03:35:01 pm
A struct is just an area of memory. So if the SD library allows you to write a block of bytes (or an array of bytes), then you need to have something like this

writefunctionname((uint8_t *)&Pattern_var, sizeof(Pattern_var)/sizeof(uint8_t));

In other words, a pointer to the structure is cast as a pointer to whatever the function will take (uint8_t, int, or other). The number of these elements to be written is the sizeof the structure divided by the sizeof the element to be written. In this case the divisor would be 1 as uint8_t is size 1 byte.

If block writes are not available then a similar thing can be done but you need to write each element of the memory buffer individually (usually using a loop), incrementing the memory pointer for each element.
412  Community / Exhibition / Gallery / Re: Scrolling LED matrix display - Parola for Arduino on: October 10, 2013, 02:39:07 am
OK, thanks for pointing that out. It was added by the staff at Tayda, I guess trying to be helpful.

It is now changed to
The video shows connections from a prototyping shield to connect the led matrices and the controls used to demonstrate the functionality of the software, but any of the usual connection methods will suffice.

The sensor shield is available a number of places, like on eBay These shields standardise the digital and analog pins to a 3 pin interface (Ground, Voltage, Signal) so that standard connection wires (for example, can be used to rapidly connect sensors.

I build the simple circuits on small circuit boards ( on which I mount a 3 pin connector for GVS. Boards have switches, LEDs, pots, lasers, IR detectors, Temp sensor, etc, mounted so that I have built a 'library' of standard modules that I can easily cable together to prototype ideas without fiddling with breadboard wires for the simple stuff. I also have some larger boards for LED display through 595 interfaces where the 595 inputs are GVS (3x3 pins) so that I can use these quickly as well.

Works for me and is completely reusable. You see the boards, with switches mounted, in the Parola video.

Hmm, re-reading that seems like a buy a lot of stuff on eBay.
413  Community / Exhibition / Gallery / Re: Scrolling LED matrix display - Parola for Arduino on: October 09, 2013, 08:54:21 pm
I am guessing here that you are referring to the Parola modules and not Mel's clock project :-)

Not sure what you mean by the control module, and I can't see a reference to it on the Tayda site. The instructions are basically the same as the BoM PDF file on Google code site (link below).

The controller in the video is an Arduino Uno running one of the example sketches that come with the Parola library download. The switches and pots are just connected to a I/O shield, I just have pre-built switches, etc, on small PCBs with standard Ground Volt and Signal (GVS) headers that make hooking up things easier and faster. The details of the pins connected are in the sketches.

If you meant something else, please let me know. If you are interested in the modular approach to my system, I am happy to share as it is not my original idea.
414  Using Arduino / LEDs and Multiplexing / Re: R/C police car LED programming help please on: October 06, 2013, 02:05:33 pm
In my repository there is code for a sketch called MultiBlink that allows multiple effects with LEDs. The patterns are specified as data and generic code runs the lights. This may be useful for you application if you incorporate it into your sketch.
415  Using Arduino / LEDs and Multiplexing / Re: LED Array with Push button, HELP on: October 04, 2013, 08:14:32 pm
If you have already started doing something it will help everyone if you post your code.
416  Using Arduino / Programming Questions / Re: Pointer example from C++ produces error in Arduino IDE on: October 01, 2013, 08:52:42 pm
int * mypointer;
should be
int *mypointer;
(no space).

Also please reuse your previous thread if you want to add information, not start a new one.
417  Using Arduino / Programming Questions / Re: pointer problem for C++ example on: October 01, 2013, 08:50:50 pm
int mypointer ;

should be

int *mypointer ;
418  Using Arduino / Programming Questions / Re: can't show time using DS1307 on: October 01, 2013, 05:30:31 pm
Have you tried one of the existing libraries with the (working) example code to check that your connections are all correct. One library is in my code repository below.
419  Using Arduino / Audio / Re: minim library question on: October 01, 2013, 03:37:42 pm

Did you try googling "strcat arduino"?
420  Using Arduino / Programming Questions / Re: Can you control 2 or more led's to do 2 differnet things at the same time.? on: September 30, 2013, 09:08:05 pm
Multiblink sketch in my code repository below can do what you need as well.
Pages: 1 ... 26 27 [28] 29 30 ... 85