Show Posts
Pages: [1] 2 3 ... 85
1  Using Arduino / General Electronics / Re: Switch de-bounce circuit. on: August 15, 2014, 07:05:58 am
I found this reference a good explanation when I was trying to understand the issues involved.

http://www.eng.utah.edu/~cs5780/debouncing.pdf
2  Using Arduino / LEDs and Multiplexing / Re: MAX7219 without scrolling on: August 15, 2014, 01:55:09 am
Look at the MD_M7xx library in the links below.  The library has examples of how to display letters and numbers. You don' have to scroll at all.

You will need to answer yourself questions as to whether the text digits will be centered or right justified, leading zero, etc. this will affect how you place the text in the matrix.
3  Using Arduino / LEDs and Multiplexing / Re: Multi-tasking LED's on: August 13, 2014, 05:23:38 pm
A sketch called Multiblink in my code repository (link below in the signature) may be useful for you. It can do what you need with minimal change.
4  Using Arduino / Sensors / Re: Arduino with 400 button ?? on: August 13, 2014, 03:14:37 am
This implementation using 3 digital control lines and a 4017 may be of interest: http://forum.arduino.cc/index.php?topic=235438

By adding in another 4017 you can get 1000 switches.
5  Using Arduino / Programming Questions / Re: switch statment changes for no reason? on: August 11, 2014, 05:51:51 pm
Buttonstate does not seem to be set to anything if there is no button pressed.
6  Using Arduino / LEDs and Multiplexing / Re: RGB LED easy smooth colour transitions on: August 07, 2014, 04:38:03 pm
The only suggestion I have is to experiment with the led thresholds. These determine the lowest level at which the led will be set by the software.
7  Using Arduino / General Electronics / Re: MAX7219 SPI Chain Length on: August 06, 2014, 05:26:54 pm
Quote
In terms of just the SPI communication, does the Parola code do anything special that the Arduino SPI library doesn't?

The control of the hardware is in the MD_MAX72xx library. No special things are done except the initialization is by the book according to the spec sheets, as mentioned by CrossRoads. You could download the library and see if it works better for you.

With lots of modules you should be using external power. The Arduino power supply won't be enough. Also make sure that the capacitors are as per the sample design on the spec sheet as that does make a difference.

What does you circuit for one module look like? Are you using standard module so your own circuits?
8  Using Arduino / General Electronics / Re: MAX7219 SPI Chain Length on: August 06, 2014, 09:29:26 am
I have had up to 20 connected together as part of testing my Parola project and others have many more than that, so the 10-12 limitation is probably not coming from the chips but somewhere else in your circuits.  The links for Parola and the forum are in my footer below.
9  Community / Exhibition / Gallery / Re: Scrolling LED matrix display - Parola for Arduino on: July 30, 2014, 08:10:01 pm
Sorry, I was not clear. I meant use DATA and CLK pins different from the hardware pins, to avoid any contention issues. With the two different data streams, if the displays still don't work with just software SPI, then you are looking at a fundamentally different problem to chase down.
10  Community / Exhibition / Gallery / Re: Scrolling LED matrix display - Parola for Arduino on: July 30, 2014, 05:08:30 am
@oscomputing

I have sent you a new version of the library to try. There were a couple of bugs in V2 that have been corrected and this is pre release.
11  Community / Exhibition / Gallery / Re: Scrolling LED matrix display - Parola for Arduino on: July 30, 2014, 02:54:37 am
@confusered

Can you try to test using different SPI pins for the sd and display?
Also, is that the latest version of sdfat? Not near my computer at the moment...

Edit: SDFAT is the same version as mine.
12  Community / Exhibition / Gallery / Re: Scrolling LED matrix display - Parola for Arduino on: July 27, 2014, 02:40:02 pm
The USE_HW is used to select the type of hardware module that you have got.

Irrespective of the hardware, the interface to the hardware is the same (SPI). SPI can be implemented in software or you can use the CPU supported hardware implementation. If you specify all the pins, then the library will assume that you are implementing the software version of SPI. If you only specify the CS pin then it defaults to the hardware implementation, where the pins are set by the type of hardware CPU you use.

All of this is in the MD_MAX72xx library documentation.

My setup is for an Arduino Uno and I use the Parola module.
13  Using Arduino / Sensors / Re: TCS3200 with Arduino Uno on: July 26, 2014, 09:38:54 pm
When you are using the sensor, are you shielding it from externally reflected light? If you are using the sensor as-is in the picture you linked to, you will get different results depending on the light level and other objects in the room.

If you see in my documentation, I built a black cardboard shielding around the LEDs and the sensor. Then when I want to sense, I lock out all the external light from the sensor by putting the shroud in contact with the material to be identified. this stops the external light from influencing the reading and I get the same every time.

I would also say that the colours on the screen will look different from colours in real life because they are produced differently.
14  Community / Exhibition / Gallery / Re: Scrolling LED matrix display - Parola for Arduino on: July 25, 2014, 04:59:21 pm
Look in the _lib header file. Each of the specifics is converted to a series of other transformations.
15  Community / Exhibition / Gallery / Re: Scrolling LED matrix display - Parola for Arduino on: July 25, 2014, 06:09:26 am
@confusered

It took a while but the answer is obvious (finally!). The pins you are selecting for the creation of the Parola object are the same pins that are defined for native-SPI hardware control. If you use the type of constructor you did, it defaults to non-native control (using these same pins). SDFat uses the same pins but with hardware controls. This overrides the non-native SPI and a mess results for the display.

Changing the constructor so that only the CS pin is defined works. This is the code that works on my system. I have left all the debug code in and you will see it has a slightly different structure. I believe that the implementation of String is buggy, so it is best to avoid it.

Code:
#include <MemoryFree.h>
#include <MD_Parola.h>
#include <MD_MAX72xx.h>

#define  USE_SDFAT  1

#define MAX_DEVICES 4
#define CLK_PIN 13
#define DATA_PIN 12
#define CS_PIN 10

// Generic output pins
MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);

#define SPEED_TIME 25
#define PAUSE_TIME 2000

char newstring[10] = "1234";
char datastring[10]  = "abcd";

#if  USE_SDFAT
#include <SdFat.h>
SdFat sd;

const int chipSelect = 4;
long index = 0;
#endif

void setup(void)
{
#if  USE_SDFAT
  sd.begin(chipSelect, SPI_FULL_SPEED);
#endif

  P.begin();    //starts parola
//  P.displayScroll(datastring, LEFT, SCROLL_LEFT, SPEED_TIME);
  P.displayText(datastring, CENTER, SPEED_TIME, PAUSE_TIME, SCROLL_LEFT, SCROLL_LEFT);

  Serial.begin(57600);
  Serial.println(F("[SDwithParola]"));
  Serial.print(F("freeMemory()="));
  Serial.println(freeMemory());
}

void loop(void)
{
  if (P.displayAnimate()) // animates and returns true when an animation is completed
  {
    getword();
    strcpy(datastring, newstring);
    Serial.print(F("datastring = "));
    Serial.println(datastring);
    Serial.println();
    P.displayReset();
  }
}

void getword()
{
#if  USE_SDFAT
  SdFile myFile;
  long index;
  
  if (!myFile.open("WORDS.TXT", O_READ))  //Open the file for reading
  {
    strcpy(newstring, "Error");
  }
  else
  {
    index = random(100) * 4;   // offset of a random number from 0 to the word count
    Serial.println(index);
    myFile.seekSet(index);      // go to position
    myFile.read(newstring, 4);  // read the word
    newstring[4] = '\0';
  }

  Serial.print(F("newstring  = "));
  Serial.println(newstring);  // Print the string to serial
  myFile.close();
#endif
}
Pages: [1] 2 3 ... 85