Go Down

Topic: 88 MILES PER HOUR!!!! LED 3DIGIT 7SEGMENT 12PIN DISPLAY (Read 3379 times) previous topic - next topic

JONE5Y

I am building a replica of the remote control that Doc Brown uses in the Film, Back To The Future.
 I figured this would be a great Arduino project to try.

My goal is to turn on the unit and see 00.0 on the display. I flip a toggle switch and the Led display will count up from 00.0 to 88.0 in 8 seconds then stop at 88.0. 

I am new to Arduino and have been searching the forums for helpful info on 7 segment display code.
I uploaded this:
( http://playground.arduino.cc/Main/SevenSegmentLibrary#.UyR5dNwmVv0 )
to test my setup.
I tried this example code but the pin out must be different than my setup. I got a first 4 segments
to light up but that was it. also I have no idea what the code needs to be to do the 8 second count up to 88.0

Here is the pin out for the display I have:
PART NO. : UN(M)4043-13 EWRS 0.4"(10.2mm)THREE DIGIT DISPLAY
3digit 7 segment 12 pin LED (common Anode I believe?)

Digit1 - pin12
Digit2 - pin9
Digit3 - pin8

a11
b7
c4
d2
e1
f10
g5
dp3
none6

Any advice or links to info would be greatly appreciated.  I have a feeling that once I see how the code works for this It will help me understand the language better for future projects.




HazardsMind

You do know the number increases as Doc slowly pushes the joystick further and further up. Maybe you can add that in too, its certainly not difficult to do code wise.\

As far as wiring goes, each pin on the display has a number, to find which one is pin 1 (which is in one of the four corners), you need to look for either a small notch or dot, then wire it based on your values ie (a11, b7 ... dp3)

Im surprised the PDF in your link, ( http://www.jameco.com/Jameco/Products/ProdDS/335055.pdf ) doesn't give a footprint.
My GitHub:
https://github.com/AndrewMascolo?tab=repositories

JONE5Y

so I figured out the pins on the led.
Bottom left to right 1-6
Top right to left 7-12

I think I might have posted this in the wrong forum thread. I think it should be in programming help.

larryd

WARNING

Do Not connect this circuit to a FLUX Capacitor !
No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

HazardsMind

#4
May 30, 2015, 04:39 am Last Edit: May 30, 2015, 04:42 am by HazardsMind
Great, you found the pin layout, now were you able to wire it and see some numbers on the display?

If you would like to move your post, you can kindly ask a moderator they can would be willing to move it. There is a little link under every reply that says Report to Moderator, click it and ask to move the post.

Or one might see your reply and move it without needing to be asked.

@LarryD

Well he would need to generate at least 1.21 gigawatts, or have it get struck by a bolt of lighting... or have a Mr Fusion reactor. ;)


Yea, I kinda nerded out there. :D (It's my favorite childhood movie series)
My GitHub:
https://github.com/AndrewMascolo?tab=repositories

CrossRoads

Why Programming help? I don't see any code, or programming questions.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

superrm11

Sounds like a fun project!

If you just want a linear growth on the numbers, I suggest a for loop with a delay, printing to the display 1 more than the last.

If you want to do as suggested and use the joystick on the remote, try mapping the potentiometer (joystick) to the number (0.0 - 88.0)

JONE5Y

I figured it out!
Got the numbers to display correctly on the LED.

Now.  The Code so far.


Code: [Select]
#include "SevSeg.h"

SevSeg sevseg; //Instantiate a seven segment controller object

void setup() {
byte numDigits = 3;  
byte digitPins[] = {2, 3, 4};
byte segmentPins[] = {6, 7, 8, 9, 10, 11, 12, 13};

sevseg.begin(COMMON_ANODE, numDigits, digitPins, segmentPins);
sevseg.setBrightness(90);
}

void loop() {
static unsigned long timer = millis();
static int deciSeconds = 0;

if (millis() >= timer) {
  deciSeconds++; // 100 milliSeconds is equal to 1 deciSecond
  timer += 100;
  if (deciSeconds == 10000) { // Reset to 0 after counting for 1000 seconds.
    deciSeconds=0;
  }
  sevseg.setNumber(123, 1);
}

sevseg.refreshDisplay(); // Must run repeatedly
}

/// END ///


I would like to get the numbers to just count up from 00.0 to 88.0 in about 8 seconds for now.
and have it triggered by a switch.  The remaining pins on the digital side of the UNO are (1, 2, and 5)
I assume I would wire the switch to one of those remaining numbers?




TomGeorge

Hi,
Good stuff, looks good, and yes use one ofthe many other I/O pins.

Can you put your code on code tags please, use the  </> icon in the reply Menu.
See section 7 http://forum.arduino.cc/index.php/topic,148850.0.html

Tom..... :)
Everything runs on smoke, let the smoke out, it stops running....

JONE5Y


JONE5Y

WARNING

Do Not connect this circuit to a FLUX Capacitor !
"When this baby hits 88 miles per hour, you are going to see some serious S@#t..."

JONE5Y

Sounds like a fun project!

If you just want a linear growth on the numbers, I suggest a for loop with a delay, printing to the display 1 more than the last.

If you want to do as suggested and use the joystick on the remote, try mapping the potentiometer (joystick) to the number (0.0 - 88.0)
Can you help me with the code for a loop with delay, printing to the display one more than the last?

HazardsMind

The loop is easy, but the question is were you able to get the display to do something with the example sketch?
My GitHub:
https://github.com/AndrewMascolo?tab=repositories

JONE5Y

Yes.

The code I posted above is giving me three numbers.  I attached an image to that post to show it was working.

I have no coding knowledge but I am learning as I put this project together.

I have seen "loop" referenced before but I don't know where it would go.  is it the void loop part of the code?

So far I have learned how to load a library example and upload it to the arduino
How to use a breadboard to wire the LED display,
How to change the sevseg.setNumber to display a 3 digit number.

Now I need help with the code I can add to count up from 0-88 in 8 seconds.  Then I will take that code and figure out how to change the variables to make it count faster or slower etc.




JONE5Y

I have a feeling I need to do something with this part?
sevseg.refreshDisplay()


Go Up