Show Posts
Pages: 1 ... 35 36 [37] 38 39 ... 85
541  Community / Exhibition / Gallery / Scrolling LED matrix display - Parola for Arduino on: June 08, 2013, 11:39:44 pm
My latest project is a scrolling text display.

Parola is a modular scrolling text display using MAX7219/21 LED matrix display controllers. The display is made up of any number of identical modules that are plugged together to create a wider/longer display.

The aim was to create a 'lego-like' approach to LED matrix display, using standard 8x8 LED matrices. The software supports this flexibility through a scalable approach that only requires the definition of the number of modules to adapt existing software to a new configuration.

The library implements functions to simplify the implementation of text special effects on the LED matrix.
  * Text left, right or center justification in the display
  * Text scrolling, appearance and disappearance effects
  * Control display parameters and animation speed
  * Support for hardware SPI interface

Hardware and software are available at http://parola.codeplex.com.
A video of the system working at http://www.youtube.com/watch?v=JgzVCSFaz3I&feature=youtu.be
542  Using Arduino / Sensors / Re: Color Sensors on: June 06, 2013, 09:59:55 pm
I did some work with the TSC230 color sensor a while ago. The library and pdf on how to use the sensor (calibrated) may be helpful. Link is in my signature below.
543  Using Arduino / LEDs and Multiplexing / Re: I'm stuck in ledControl and a Max7219 board. (Solved) on: June 06, 2013, 09:54:29 pm
I am still amazed at how the most obvious things take time to fix because they are hiding in plain sight!
544  Using Arduino / LEDs and Multiplexing / Re: I'm stuck in ledControl and a Max7219 board. (Partly solved) on: June 06, 2013, 02:26:42 am
Every time you exit loop() and re-enter, the variables are recreated.

However, what does make some sense is that the variables will occupy the same location as there is nothing else happening between calls (ie, they are recreated in the same order). Unless the number is negative, the variable is actually not initialised to false and keeps wahtever the value was when it was created. Try changing the variable declaration to

Code:
boolean negative = false;
545  Using Arduino / Programming Questions / Re: Help With TCS3200 Color Sensor (Understanding Output) on: June 05, 2013, 04:59:15 pm
I didn't take averages because I found that the readings I got back were identical, surprisingly, but that meant that one reading was enough. I guess that is because we are counting pulses over a relatively (in computer terms) long time.

Whether you need Fd depends on how you apply the sensor. With my sensor Fd was 2-5% of the full range, depending on the filter applied (R, G or B). If you are only trying to measure relativity between samples (ie, something is more 'red' or 'green' than something else) then ignoring Fd is fine, as the sensor's linearity will give you what you need.

However, if you are trying to find the actual RGB colour of a sample, then Fd becomes important. The mappings I was getting were close to the colour's RGB number, but in some cases the 'look' of that colour was very different. Adding the Fd correction fixed that up.

Fd is also useful for correction of your background is not 'black' as the background will contribute to the colour you are trying to measure.
546  Using Arduino / LEDs and Multiplexing / Re: I'm stuck in ledControl and a Max7219 board. (Partly solved) on: June 05, 2013, 04:47:12 pm
Just to try something different, instead of setting the boolea, set the characetr to be displayed in a char variable and then use that char in the display? I can't see it either but sometimes just changin what you are doing can shed light on the problem.

Code:
    if (v<0)
 {
        c = '-';
        v = -v;
 }
else
    c = ' ';

...

       lc.setChar(0, 4, c, false);
547  Using Arduino / Displays / Re: 2 line LCD display: can't figure out pinout on: June 05, 2013, 07:12:37 am
If you have the pin definitions, look for the ground pin and try and find it among the pins. Ground is usually connected to the ground plane and is easy to find.  Once you have that the rest should fall out easily enough.
548  Using Arduino / LEDs and Multiplexing / Re: I'm stuck in ledControl and a Max7219 board. (Partly solved) on: June 05, 2013, 07:01:45 am
Then negative must be set wrong. Try printing it out in a few places?

There is not much to this program, so print things as you go through and see where things don't make sense.
549  Using Arduino / LEDs and Multiplexing / Re: I'm stuck in ledControl and a Max7219 board. How to input numbers? on: June 03, 2013, 09:27:57 pm
Use Serial.print() to see what the value v is. If it is not negative (and it should not be) then the fault is in your logic for how you determine and/or print '-'.

Serial.print() is your friend in this sort of debugging.
550  Using Arduino / LEDs and Multiplexing / Re: I'm stuck in ledControl and a Max7219 board. How to input numbers? on: June 02, 2013, 08:10:47 pm
It would help if you tell us what the compile error is, and you put the actual code that is causing the error in the post. The current code does not appear to have any way of inputting the number, unless I am missing something.
551  Using Arduino / Storage / Re: Read SD card for data on: June 02, 2013, 07:05:12 pm
Have you done any tests to see if it is possible to read the amount of data in the time you are expecting?

A simple loop with timing values (I guess microsecond rather than millis) either side of the 'read' will give you some base data to look at to decide feasibility of the approach.
552  Using Arduino / Programming Questions / Re: changing calculating time depending on speed of readings on: June 01, 2013, 08:18:57 pm
A flag is usually a normal Boolean (true/false) variable that is used to indicate an event has happen or a condition has been reached.

The event 'sets' the flag so that it is seen by other parts of the code and can be 'reset' when the event is processed. Think of the US postal service setting the 'flag' on a letterbox so that you don't need to walk out to the letterbox to check but just need to see, from a distance, check if the flag is set.

Most useful to capture one-off events (like an interrupt), or to create a proxy for a complex checking sequence (like walking out to the letterbox).
553  Using Arduino / Programming Questions / Re: Exiting an "if" statement on: May 31, 2013, 03:17:56 pm
If you are rewriting code, then consider using a function for this block of code which is repeated many times:

Code:
      motor1.setSpeed(200);
      motor2.setSpeed(200);
      motor1.run(FORWARD);
      motor2.run(FORWARD);
      delay(100);

becomes
Code:
setMotors(FORWARD, 200, FORWARD, 200, 100);

if you define a function
Code:
void setMotors(uint8_t dirM1, uint16_t spdM1, uint8_t dirM2, uint16_t spdM2, uint16_t waitDelay)
{
      motor1.setSpeed(spdM1);
      motor2.setSpeed(spdM2);
      motor1.run(dirM1);
      motor2.run(dirM2);
      delay(waitDelay);
}

I would also say that at some point you will need to get rid of the delays in you code for this software to run properly. Look at the Blinkwithoutdelay example in the IDE for how you can do this.
554  Using Arduino / Programming Questions / Re: Exiting an "if" statement on: May 30, 2013, 09:48:55 pm
Code:
if ( 10 >= distance >= 1)

I can remember making this mistake when I wrote my first BASIC programs, way back when a TRS80 was high tech, because this is the mathematical representation of the intent. In code you write each comparison is a single comparison between values.

Code:
if ((10 >= distance ) && (distance >= 1))

or, as a style thing,

Code:
if ((distance >= 1) && (distance <= 10))

555  Using Arduino / Programming Questions / Re: Rounding sensor values down to 2 decimal places on: May 30, 2013, 09:40:15 pm
One (convoluted) way is to multiply by 100 (or 10^x where x is the number of decimal points you need), cast it to an int or long, then assign it back to a float and divide by 10^x.

eg, using 10.987
* 100 = 1098.7
to int 1098
to float 1098.0
/100 = 10.98

If you just need conversion when the number is printed you can specify that in the print statement.
Pages: 1 ... 35 36 [37] 38 39 ... 85