Show Posts
Pages: 1 ... 21 22 [23] 24 25 ... 79
331  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.
332  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.
333  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.
334  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.
335  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.
336  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.
337  Using Arduino / Programming Questions / Re: pointer problem for C++ example on: October 01, 2013, 08:50:50 pm
int mypointer ;

should be

int *mypointer ;
338  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.
339  Using Arduino / Audio / Re: minim library question on: October 01, 2013, 03:37:42 pm

Did you try googling "strcat arduino"?
340  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.
341  Using Arduino / Audio / Re: minim library question on: September 30, 2013, 08:47:43 pm
Assumng your strings are character arrays and not String objects, loo up the sprintf() or strcat() functions.

I would also recommens that you read something formal if you want to get into programming. You would never try to learn a language like Russian by just reading "War and Peace" and hoping for the best.
342  Using Arduino / LEDs and Multiplexing / Re: Led Matrix 8x8 x5 max7219 on: September 29, 2013, 09:15:08 pm
You should be creating arrays for the bit pattern and the delay (either 2 arrays or an array of a structure with the data in it). This then allows you to create a tight loop to process each array element to do what you want. You also don't need to leave a delay between outputting to the different modules.

If you look at the Parola link below you will see how fast these devices can be driven (video) and you can look at the code (not beginner's level though, but you may get some hints). The examples that come with the MD_MAX72XX may also help you understand what is going on.
343  Using Arduino / Audio / Re: Real time midi recording on: September 20, 2013, 02:17:58 pm
I did something similar some time ago - just recording the MIDI stream coming from a keyboard and then playing it back. At the time it was to try and understand what was happening in the MIDI stream. I have attached it to the post in case it can be useful to you.
344  Using Arduino / Storage / Re: Arduino with multiple slaves using spi on: September 18, 2013, 12:34:38 am
The digitalWrite (SSx, HIGH) and the digitalWrite(SSx, LOW) need to be exactly the same (ie, x=1 or x=2, but the same x in both cases. I can't tell you if the first case should be all SS1 or SS2 as it is not clear, but they need to reference the same pin. One command puts it HIGH, the other puts it LOW. It is like lifting the handset on a telephone - you lift and put back the same one, you don't pick up one and then put back another one.
345  Using Arduino / Storage / Re: Arduino with multiple slaves using spi on: September 17, 2013, 10:29:02 pm
No, it is not correct. The point of the SS pin is that it signals to the device that it is enabled when the pin is high. So if you have 2 devices, then when you want to communicate to one device, you put the SS1 or SS2 pin HIGH, do the comms, and then set the SAME SS pin LOW at the end.
Pages: 1 ... 21 22 [23] 24 25 ... 79