Hi All,
As is probably clear - I'm very new at Arduino, programming, etc.
I'm trying to get the pixels in the MAX7219 to flash randomly and am using IDE V1.6.9 with a Elegoo Uno R3. The LedControl library is installed and works with other sketches.
I found the code here: http://arduinolearning.com/code/random-flashing-max7219-example.php
When verifying it falls over on the first line with the message:
#include expects "FILENAME" or
The Sketch follows:
#include “LedControl.h” // need the library
LedControl lc=LedControl(12,11,10,1); //
// pin 12 is connected to the MAX7219 pin 1 labelled DIN
// pin 11 is connected to the CLK pin 13 labelled CLK
// pin 10 is connected to LOAD pin 12 labelled as CS
// 1 as we only have 1 MAX 7219 atatched
long randNumberX;
long randNumberY;
void setup()
{
// the zero refers to the MAX7219 number
lc.shutdown(0,false);// turn off power saving
lc.setIntensity(0,4);// sets brightness (0~15 possible values)
lc.clearDisplay(0);// clear screen
Serial.begin(9600);
// if analog input pin 0 is unconnected, random analog
// noise will cause the call to randomSeed() to generate
randomSeed(analogRead(0));
}
void loop()
{
randNumberX = random(0,8);
randNumberY = random(0,8);
lc.setLed(0,randNumberX,randNumberY,true); // turns on LED at col, row
delay(20);
lc.setLed(0,randNumberX,randNumberY,false); // turns on LED at col, row
delay(20);
}
Many thanks in advance.
NevT