Go Down

Topic: Need Code for My Time Machine (3 digit 7 segment display) (Read 28 times) previous topic - next topic

JONE5Y

"Damn it Jim, I'm a Prop Builder not a programmer!..."

I am building a replica of the Remote control used by Doc Brown in Back To The Future (attached reference photo).  I want it to light up and do cool stuff, SO I am integrating a Arduino into the build.

I have very little programming experience.  I have figured out how to add a library to my sketch, upload the example code to my Arduino UNO and wire the i/o devices to it.

The Plan:
I have a 3digit 7 segment 12 pin display attached to the prop that will count up from 00.0 then stop on 88.0 The counting will be activated via the  a toggle switch.

The prop will have a 9v battery that powers the arduino.
When the arduino powers on it will send 00.0 to the LED display and await further input.  
Another switch will start the count up to 88.0 and take 8 seconds to do so.  once the display hits 88.0 it holds that number until the arduino is turned off.

I have already wired the 3 digit display to the arduino and have a few pins left for the toggle switch.
Digital Pin 1, 2, and 5 (Attached Photo of the 3 digit display working)

I will attach the code I have so far which is a SevSeq Library that is currently allowing me to display and hold three numbers and a decimal point.

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(deciSeconds, 1);
  }

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

/// END ///


I am looking for help from a programmer who can write the necessary code to perform the functions stated above.  let me know of any additional info you need for the project.  I am happy to discuss yur rate for the work.

Bainesbunch

EmbeddedAT .. From Concept to Prototype to Production
Electronics and firmware design and project mentoring
I do answer personal requests for help when accompanied with a PayPal receipt ;)

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy