Show Posts
Pages: 1 2 [3] 4 5 ... 86
31  Community / Exhibition / Gallery / Re: Scrolling LED matrix display - Parola for Arduino on: July 25, 2014, 02:48:45 am
Quote
i was working on writing some kind of control if the hours are 9 or less to only show 1 digit for the Hours, while i'm trying  i found out that if i only change this line,  sprintf(psz, "%02d%c%02d", RTC.h, (f ? ':' : ' '), RTC.m); to sprintf(psz, "%01d%c%02d", RTC.h, (f ? ':' : ' '), RTC.m); the display will work exactly like i want, single digit hour when 9 or less and two digits when 10 - 12 . simple but works !!!.

A personal preference comes into play for me. This will work well if the date is just scrolled across the screen, but if you are putting the date in a particular field, it will be a different width and will step jump across when the hours change from one digit to two. This is not the behaviour users expect from a clock, as they are used to seeing the digits remain in the same place.

Quote
The second thing i wanted to ask about  is the DS_1307 serial time adjusting  program , it keeps giving wrong times  and some times not responding , is it written so only the time can be adjusted in 24h mode and then i cans witch to 12h mode.
because  if its in 12H mode  it will not accept the time_date string and gives back (bad (t)) or it will run along line of rubbish characters.

Yes. It is just meant to be a utility to get around the issue of setting time accurately. I can live with this.
32  Community / Exhibition / Gallery / Re: Scrolling LED matrix display - Parola for Arduino on: July 25, 2014, 02:42:55 am
Hola nikomaz!

The orientation of the matrix can be adjusted in the software, but you need to do it in the MD_MAX72xx library. What to do is described in the documentation for the library. You will need to set some compile time switches to make it work - afsaisi has already told you a bit but exactly what you need to do will depend on how your matrix is wired up.
33  Community / Exhibition / Gallery / Re: Scrolling LED matrix display - Parola for Arduino on: July 23, 2014, 10:23:38 pm
Try changing the CS pin to a free pin that is not 10 in the Parola initialiser.
34  Community / Exhibition / Gallery / Re: Scrolling LED matrix display - Parola for Arduino on: July 23, 2014, 07:10:10 am
Do you have enough RAM to run both of these? On an Uno there is about 2k or RAM for stack and heap storage. The SD card buffer will already take up about 512 bytes. There is a function that you can add to your programs to display the amount of free RAM (search for it, I forget the name at this stage). Do each program separately and add it up. The actual total will be a little less than the sum of the two because of common elements that will only be counted once when combined, but you should get an impression if this is a problem.

If this is not the case, then you will need to be specific about what 'dies' when sd.begin() is called.
35  Community / Exhibition / Gallery / Re: Scrolling LED matrix display - Parola for Arduino on: July 18, 2014, 05:23:42 am
You want to keep the time string the same length so that the time does not jump around in the field. I would define a blank character the same width as zero then use that instead if the leading zero.
36  Using Arduino / Audio / Re: Midi-Out does not work well on: July 18, 2014, 04:31:06 am
You are correct. That code plays one note only.
37  Community / Exhibition / Gallery / Re: Scrolling LED matrix display - Parola for Arduino on: July 16, 2014, 01:24:39 pm
The DS1307 library has an example program where which uses the serial monitor to interact with the RTC. One of the functions is to set the current time and date.
38  Community / Exhibition / Gallery / Re: Scrolling LED matrix display - Parola for Arduino on: July 15, 2014, 02:55:43 am
I understand the complexity of the Arabic script and how the letters look different depending on where they are in a word. That is why, with no training and no feel for the language I did not want to even consider any automatic parsing of sentences for adjustment. I hope you can do a good job smiley
39  Community / Exhibition / Gallery / Re: Scrolling LED matrix display - Parola for Arduino on: July 14, 2014, 07:30:47 pm
Good that you got it working.

I downloaded the library from the Codeplex site and the '// that you saw is not in the download, so I have no explanation.

The inter character spacing can be adjusted by the method setChararacterSpacing(). It is fully under calling program control and is documented in the library html docs. 5x7 is not a limit and there are many characters defined that are bigger than this. The font builder can handle much bigger matrices.
40  Community / Exhibition / Gallery / Re: Scrolling LED matrix display - Parola for Arduino on: July 14, 2014, 02:58:23 am
I have tried to compile with the setup I have an cannot get the same result as you do.

The error is what it says it is - a stray \ somewhere.

Try the following:
1. Can you compile and run the MD_MAX72xx example MD_Test? If you can the problem is not in the MD_MAX library.
2. What examples in the Parola library can you compile and run?
41  Using Arduino / Programming Questions / Re: LCD Keypad Shield Debounce on: July 14, 2014, 02:01:29 am
I have just found out the same thing about the 'A0'. It should not be like that so I will keep looking at it.

You need to implement a finite state machine. Basically the code will look something like this:
Code:
void updateDisplay()
{
  static uint 8_t state = 0;
  char c = lcd.getKey();

  switch (state)
  {
  case 0:
    if (c==SELECT)  state = 1;
      break;

  case 1:
    // display fan 1 reading
    state = 2;
    break;

  case 2:
    if (c == DOWN)   state = 3:
    break;

   case 3:
   // display fan 2 reading
   state = 4;
   break;

  case 4:
    if (c==UP)  state = 1;
    else if (c == DOWN)  state = 5:
    break;

   case 5:
   // display fan 3 reading
   state = 6;
   break;

  case 6:
    if (c==UP)   state = 3;
    else if (c == DOWN)   state = 7:
    break;

   case 7:
   // display fan 3 reading
   state = 8;
   break;

  case 8:
    if (c==UP)  state = 5;
    break;

  default:
    state = 1;
    break;
  }
}

loop()
{
   // do stuff
  updateDisplay();
  // do more stuff
}

This can be done more elegantly, but the layout will help you get an idea of what is happening. This initially looks like it is doing nothing, but you need to track what the code is doing every time through loop() to understand how it works. A lot of other Arduino programs work this way, especially when you eliminate the delay() functions that cause problems in beginner code.
42  Community / Exhibition / Gallery / Re: Scrolling LED matrix display - Parola for Arduino on: July 13, 2014, 10:16:56 pm
What is being reported as an error is something I thought was fixed some time ago, so can you check you have the latest version of FontBuilder and the library files?

Basically the problem is that in C++ is a line ends with '\' the compiler thinks that it continues on the next line.

Looks for a line that looks like this in the font .h file (in the libraries/MD_Parola folder)
Code:
5, 2, 4, 8, 16, 32, // 92 - \
and change it to this
Code:
5, 2, 4, 8, 16, 32, // 92 - '\'
By putting the character in single quotes it changes the special meaning of the character at the end of the line.
43  Using Arduino / Programming Questions / Re: Program can't open file on SD card on: July 13, 2014, 07:59:36 pm
I don't use the SD library because I use SDFat, however, the line
Code:
if (myFile!=false)
is different from the shorter example and could be the problem.

myFile can be evaluated as a logical expression - as in "(myfile)" - because the C++ compiler will treat any non-zero value as 'true'. So a NULL pointer (typically zero) will evaluate as false, although I would prefer to explicitly use "pointer == NULL". By comparing "myFile != false" the expression is only logically true if myFile is not equal to the value false (and I don't know what it is). Maybe changing this to the same logic as the simpler example could make a difference.
44  Using Arduino / Programming Questions / Re: LCD Keypad Shield Debounce on: July 11, 2014, 03:39:19 am
In my code libraries linked from the signature below, I have a small library to handle the analog buttons found in the LCD shield. You may be able to see how to do what you want from reading that code.

Basically you need to detect the transition from off to on rather than the on state itself.
45  Using Arduino / Programming Questions / Re: Compare array to set of numbers on: July 07, 2014, 04:54:10 pm
Where is the data array being set with the data from the device?

The only place I can see that data[] is initialised is when you print the data in the debug message. Before that it is undefined.
Code:
for ( i = 0; i < 32; i++)
{    
      data[i] = ds.read();        
      Serial.print(data[i]);      
      Serial.print(" ");          
}
Pages: 1 2 [3] 4 5 ... 86