HCMAX7219 - LED driver library

Useful guides, libraries, and example sketches to support our Arduino based products.
RetroBoy
Posts: 73
Joined: Sat Feb 26, 2022 11:29 am
Location: U.K.

Re: HCMAX7219 - LED driver library

Post by RetroBoy » Sat Feb 26, 2022 11:30 pm

Sorry to bother you all, however I'm a fairly old 'Newbee', picking up from 50yrs ogo. ( haha - but true ).
So, using latest version ( v5 ) .zip file give the following error when verify/compile;

HCMODU0082_Serial_7_Segment_Module_Example1:52: error: 'HCMAX7219' does not name a type
HCMODU0082_Serial_7_Segment_Module_Example1.ino: In function 'void setup()':
HCMODU0082_Serial_7_Segment_Module_Example1:57: error: 'HCMAX7219' was not declared in this scope
HCMODU0082_Serial_7_Segment_Module_Example1.ino: In function 'void loop()':
HCMODU0082_Serial_7_Segment_Module_Example1:64: error: 'HCMAX7219' was not declared in this scope

Is it me, or what do I do ?

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: HCMAX7219 - LED driver library

Post by andrew » Sun Feb 27, 2022 8:40 am

I've given the library and sketch a quick check and it seems to be compiling fine for me. Could you see if the simplified sketch I've pasted below works for you.

If you still get an error can you cut and paste the entire output from the output window into a post. You should be able to do this by clicking the 'copy error messages' button found on the right hand side of the Arduino IDE just above the output window.


Code: Select all

#include <HCMAX7219.h>
#include "SPI.h"

#define LOAD 10

HCMAX7219 HCMAX7219(LOAD);

void setup() 
{   
  HCMAX7219.Init(); 

  HCMAX7219.Clear();
}

/* Main program */
void loop() 
{
  
}
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

RetroBoy
Posts: 73
Joined: Sat Feb 26, 2022 11:29 am
Location: U.K.

Re: HCMAX7219 - LED driver library

Post by RetroBoy » Sun Feb 27, 2022 10:16 am

Thanks for the Very Quick responce. However ...

Arduino: 1.0.6 (Windows XP), Board: "Arduino Uno"
C:\Program Files\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -IC:\Program Files\Arduino\hardware\arduino\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\variants\standard -IC:\Program Files\Arduino\libraries\SPI C:\DOCUME~1\Pc-User\LOCALS~1\Temp\build7116425285882788520.tmp\sketch_feb27a.cpp -o C:\DOCUME~1\Pc-User\LOCALS~1\Temp\build7116425285882788520.tmp\sketch_feb27a.cpp.o

sketch_feb27a.ino:1:23: warning: HCMAX7219.h: No such file or directory
sketch_feb27a:6: error: 'HCMAX7219' does not name a type
sketch_feb27a.ino: In function 'void setup()':
sketch_feb27a:10: error: 'HCMAX7219' was not declared in this scope

I know you may say it's XP causing the probs but the free code that comes with IDE works OK.
My past, before Retirement and ill health, was Snr. Analyst/Programmer for Mainframes ... not pc based; very different programming and machines.

RetroBoy
Posts: 73
Joined: Sat Feb 26, 2022 11:29 am
Location: U.K.

Re: HCMAX7219 - LED driver library

Post by RetroBoy » Sun Feb 27, 2022 6:17 pm

Andrew, at last ... have found what the issue is.
Any code I download from HC gets an ' ACCESS DENIED ' attribute. Thankfully ' Attrib ' sorts it out, compile is HAPPY, uploads to UNO perfectly ! I think it maybe the AV Software ( McAfee ) causing the issue.
Many appologies if this has caused any problems for you.

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: HCMAX7219 - LED driver library

Post by andrew » Mon Feb 28, 2022 9:00 am

Ok, glad you managed to sort it. I was going to suggest that from the following error...

HCMAX7219.h: No such file or directory

...that it looks like the IDE can't find the library file(s). But I guess that was due to your AV program interfering with the process. I don't know why sometimes AV programs have issues with library files as they are just a bunch of zipped up text files with no executable code in them. Usually though they are temporary false positives and running an update on your AV scanner can often fix the problem.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

mahdi97
Posts: 1
Joined: Tue Aug 23, 2022 7:50 am

Re: HCMAX7219 - LED driver library

Post by mahdi97 » Tue Aug 23, 2022 8:25 am

bro thanks a lot for this amazing library

Scooter861013
Posts: 1
Joined: Thu Feb 22, 2024 2:27 pm

Re: HCMAX7219 - LED driver library

Post by Scooter861013 » Thu Feb 22, 2024 2:57 pm

Hello,


Can someone send an example code for a time and date display? I would have 2 7219 displays with 7 segments and an RTC module...

Thanks

Post Reply

Return to “Arduino”