Hi
does anyone know how it must work with the max7219, and arduino.a matrix of 8 x 8 led to a random to let go?
I have this set,
http://www.ebay.com/itm/MAX7219-Dot-Led-Matrix-Module-MCU-LED-Display-Control-Module-Kit-For-Arduino-/141012140148?pt=LH_DefaultDomain_0&hash=item20d4fa8074
who knows a sketch or want one for me????
Use the random( ) command to pick a number from 0 to 63, then write the appropriate bit into one of 8 registers that represents the state of the 64 LEDs the MAx7219 controls.
There says you all quite a bit,
I get nothing like.I can't programming, have the arduino only for, that it is fun.
You can not find it so easy, if you give an example??
sorry though.
I see a lot of code, but no example what I so find.I want to be with, that 1 led matrix display max7219 and PCB, random displayed word.
but thanks for quick replies.
I hope for a solution
nobody wil help me?????
Browse the "Parola" library, I think it will be what you are looking for.
parola lib installed,but, i have this.
In file included from Parola_Display.ino:12:
C:\Program Files (x86)\Arduino\libraries\MD_Parola/MD_Parola.h:218: error: expected identifier before numeric constant
C:\Program Files (x86)\Arduino\libraries\MD_Parola/MD_Parola.h:218: error: expected `}' before numeric constant
C:\Program Files (x86)\Arduino\libraries\MD_Parola/MD_Parola.h:218: error: expected unqualified-id before numeric constant
C:\Program Files (x86)\Arduino\libraries\MD_Parola/MD_Parola.h:221: error: expected declaration before '}' token
by this example
#include <font.h>
#include <font_koi8.h>
#include <ht1632c.h>
// Program to demonstrate the MD_Parola library
//
// For every string defined by pc[] iterate through all combinations
// of entry and exit effects.
//
// Animation speed can be controlled using a pot on pin SPEED_IN
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
// Define the number of devices we have in the chain and the hardware interface
// NOTE: These pin numbers will probably not work with your hardware and may
// need to be adapted
#define MAX_DEVICES 1
#define CLK_PIN 13
#define DATA_PIN 11
#define CS_PIN 10
// set to 1 if we are implementing the user interface pot
#define USE_UI_CONTROL 1
#if USE_UI_CONTROL
#define SPEED_IN A5
uint8_t frameDelay = 25; // default frame delay value
#endif // USE_UI_CONTROL
// Hardware SPI connection
MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
// Generic output pins
// MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);
#define SPEED_TIME 25
#define PAUSE_TIME 1000
// Turn on debug statements to the serial output
#define DEBUG 0
#if DEBUG
#define PRINT(s, x) { Serial.print(F(s)); Serial.print(x); }
#define PRINTS(x) Serial.print(F(x))
#define PRINTX(x) Serial.println(x, HEX)
#else
#define PRINT(s, x)
#define PRINTS(x)
#define PRINTX(x)
#endif
// Global variables
uint8_t curText;
char *pc[] =
{
"Parola for",
"Arduino",
};
uint8_t inFX, outFX;
textEffect_t effect[] =
{
PRINT,
SCAN_HORIZ,
SCROLL_LEFT,
WIPE,
SCROLL_UP_LEFT,
SCROLL_UP,
OPENING_CURSOR,
GROW_UP,
SCROLL_UP_RIGHT,
BLINDS,
CLOSING,
GROW_DOWN,
SCAN_VERT,
SCROLL_DOWN_LEFT,
WIPE_CURSOR,
DISSOLVE,
OPENING,
CLOSING_CURSOR,
SCROLL_DOWN_RIGHT,
SCROLL_RIGHT,
SLICE,
SCROLL_DOWN,
};
#if USE_UI_CONTROL
void doUI(void)
{
// set the speed if it has changed
{
int16_t speed = map(analogRead(SPEED_IN), 0, 1023, 0, 250);
if (speed != (int16_t)P.getSpeed())
{
P.setSpeed(speed);
P.setPause(speed);
frameDelay = speed;
PRINT("\nChanged speed to ", P.getSpeed());
}
}
}
#endif // USE_UI_CONTROL
void setup(void)
{
Serial.begin(57600);
PRINTS("[Parola Demo]");
#if USE_UI_CONTROL
pinMode(SPEED_IN, INPUT);
doUI();
#endif // USE_UI_CONTROL
P.begin();
P.setInvert(false);
P.displayText(pc[curText], CENTER, SPEED_TIME, PAUSE_TIME, effect[inFX], effect[outFX]);
}
void loop(void)
{
#if USE_UI_CONTROL
doUI();
#endif // USE_UI_CONTROL
if (P.displayAnimate()) // animates and returns true when an animation is completed
{
// Set the display for the next string.
curText = (++curText) % ARRAY_SIZE(pc);
P.setTextBuffer(pc[curText]);
// When we have gone back to the first string, set a new exit effect
// and when we have done all those set a new entry effect.
if (curText == 0)
{
outFX = (++outFX) % ARRAY_SIZE(effect);
if (outFX == 0)
{
inFX = (++inFX) % ARRAY_SIZE(effect);
if (inFX == 0)
P.setInvert(!P.getInvert());
}
P.setTextEffect(effect[inFX], effect[outFX]);
}
// Tell Parola we have a new animation
P.displayReset();
}
}
gives the following error codes,
what is there to do???
in all the examples that comes with sitting, the same errors
In file included from Parola_Display.ino:12:
C:\Program Files (x86)\Arduino\libraries\MD_Parola/MD_Parola.h:218: error: expected identifier before numeric constant
C:\Program Files (x86)\Arduino\libraries\MD_Parola/MD_Parola.h:218: error: expected `}' before numeric constant
C:\Program Files (x86)\Arduino\libraries\MD_Parola/MD_Parola.h:218: error: expected unqualified-id before numeric constant
C:\Program Files (x86)\Arduino\libraries\MD_Parola/MD_Parola.h:221: error: expected declaration before '}' token
at the parola library, become a potentiometer, and switch used.
This is not intended.I simply search something with the max7219 and display, the display shows a led, random over.
parola problem is solved, was a missing library.
There is no one who wants to make a sketch for me, with random, that 1 led on the PCB max7219 display goes??
Parola is also not the solution viz.
.This is the PCB with MAX7219
http://www.ebay.com/itm/1PCS-MAX7219-Dot-matrix-module-MCU-control-Display-module-DIY-kit-for-Arduino-/121424228186?pt=LH_DefaultDomain_0&hash=item1c4572af5a
There is no one who wants to make a sketch for me, with random, that 1 led on the PCB max7219 display goes??
What? ![]()
If anyone wants to make a sketch for me, which is to 1 led, random to show up on max7219 matrix.
It's bad English is comes through the translator.
My source:
(most of it included here..)
There are also examples included.
I have added some chars to it.
Demoprog "LEDdem7segment" will run several functions...
..add this procedure to the program to obtain random blinking leds
void setrandom()
{
// setLed(int addr, int row, int col, boolean state);
digits.setLed(0, random(8) , random(8) , true); // set a random led
digits.setLed(0, random(8) , random(8) , false); // clear a random led
}
call "setrandom()" (repeatedly) from within the loop
LedControl.zip (11 KB)
I have no leddem7segments and I also don't know where I should post
I have downloaded led7dem7segments, now,
what was under your message
I don't know where I should post, that code, and I'm talking about is a MATRIX display, not your code for 7 segment display???
is translated my engels is not good.
You will get patterns anyway
Just comment out what is not needed.
Use the additional "setLed" - function to light a single led
or setRow/setColumn.. Documentation for theese are found Arduino Playground - LedControl
I am very bad at programming,
if you do not have a sketch for me??
in any case, thanks for the help
.(. I'll write an example.. Give me a moment...)
What is output from the other example programs ??
// pin 12 is connected to the MAX7219 pin 1
// pin 11 is connected to the CLK pin 13
// pin 10 is connected to LOAD pin 12
// 1 as we are only using 1 MAX7219
..U have, og course, to det the connections right..
#include "LedControl.h"
LedControl lc=LedControl(12,11,10,1);
void setup()
{
lc.shutdown(0,false);
lc.setIntensity(0,8);
lc.clearDisplay(0);
}// this will , after time, light up 50% of LEDs
void loop()
{
digits.setLed(0, random(8) , random(8) , true); // set a random led
delay(10);
digits.setLed(0, random(8) , random(8) , false); // clear a random led
delay(10);
}