7 Segment Display Library

Hi all, i've only written a library that is a little useful to me to maintain the code clear when using 7 segs display with 7447 decoder. i'm only going to share that one. When installed through the wizard, you will find examples directly into your Arduino IDE. Of course that wont work without an Arduino IDE previously installed.

here's the link to the installer, hope you enjoy it (the limit is that you can control max 1 display with 9 numbers for now): Download Library (Windows Binary) Download Library (zip Archive)

Can you remove that link ? It is not working and I’m not sure if there is a virus somewhere in it.
You can attach a zip file to a post, or post the complete source code. Either here in a post, or in the Playground section or on Github.

It works... A virus? -.-"

dnviti1994: Hi all, i've only written a library that is a little useful to me to maintain the code clear when using 7 segs display with 7447 decoder. i'm only going to share that one. When installed through the wizard, you will find examples directly into your Arduino IDE. Of course that wont work without an Arduino IDE previously installed.

here's the link to the installer, hope you enjoy it (the limit is that you can control max 1 display with 9 numbers for now): Download Library

Why does your link point to an EXE? That is extremely suspicious.

And what is the point of a code library to run a seven segment decoder? That is a wiring problem, not a software problem. All you have to do in software is send 4 bits of data to the output pins you have wired to your decoder.

Is only for make the code shorter: one line instead of 4. I posted an exe because is an automated installer, that is the VirusScan: https://www.virustotal.com/it/file/92a29f1dba35638d431cecce281df95f9cc17104141dd30cab5c3bd526ecd366/analysis/1405385533/

One of them recognize it as an Adware... is not an Adware neither a virus, is only a stupid little short library.

Thanks for editing the link, the link is working now, but I don't want to download a *.exe file. Please give us the source code or a zip file and please don't use mega.co.nz I'm using linux, so instead of an *.exe I rather have a *.tgz file XD

Peter_n: Thanks for editing the link, the link is working now, but I don't want to download a *.exe file. Please give us the source code or a zip file and please don't use mega.co.nz I'm using linux, so instead of an *.exe I rather have a *.tgz file XD

Done, now the exe is updated and i added a zip download. Both are Dropbox downloads.

Thank you. You use very consistant text layout. I like that a lot, now I can see with a glance what the code does. You can sign up at Github and publish it at Github. Others can view the sources and download the zip file from Github. And you can add an entry in the Playground, there is already a large seven segment display section. http://playground.arduino.cc/Main/InterfacingWithHardware#LED scroll down for the "Seven segment displays" section.

Question,
Why do this with your numbers, instead of making one function that accepts a byte value and using a simple FOR loop, do a bitRead of that value and send it out to the pins? You can put the pins in an array if needed.

void SegNumbers::one(){ // D=0 - C=0 - B=0 - A=1 — SHOWS THE NUMBER 1

// NUMBER 1 - 0001

// ENABLE PIN
digitalWrite(_en, HIGH);

// SEGMENTS
digitalWrite(_d, LOW);
digitalWrite(_c, LOW);
digitalWrite(_b, LOW);
digitalWrite(_a, HIGH);

}

This is what I mean

void SegNumbers::Digit(byte value){	// D=0 - C=0 - B=0 - A=1  --- SHOWS THE NUMBER 1

	// NUMBER 1 - 0001
	
	// ENABLE PIN
	digitalWrite(_en, HIGH);
        
        // _pins[0] = _a
        // _pins[1] = _b
        // _pins[2] = _c
        // _pins[3] = _d

	// SEGMENTS
        for(byte i = 0; i < 4; i++)
	    digitalWrite(_pins[ i ], bitRead(value, i ) );

}

Why use a 7447? Better to use a shift register, can load the data into it and forget it, don't need to keep the pins tied up. Use 3 pins (SCK, MOSI, SS) to send data to daisy chained shift registers, drive as many digits as you want.