Can someone help me update these code into 1.0.1.

I’m have no programing experience…i know these code work on older software, but since 1.0 it wont work anymore =(. Can some expert take a look, thanks.

ROCKET LAUNCHER CONTROLLER.  05 Jan 2012 (hardware implemented version)

-A count-down TIMER is implemented.
-The potentiometer is used to set the TIMER.
-Two Push-Buttons: "ARM" to set the counter and "GO" to start the counter.
-Display: Sparkfun's Serial 4 Digit 7-Segment Display . COM-09766 (RED).
-NewSoftSerial library is used to avoid random commands to the display
 during program downloading.
#define FuseTIME      1500  //Fuse current duration in milliseconds.

#include <NewSoftSerial.h>  //Usinf the NewSoftSerial library.

#define Fuss     7          //Pin connected to the Fuse relay.
#define GoButt   6          //Pin connected to the GO button.
#define ArmButt  5          //Pin connected to the ARM button.
#define BuzzPin  4          //Connected to the Speaker.
#define TXdata   3          //Conneted to Rx of the Display.
#define RXdata   2          //not used in this project
#define SetPot   0          //Analog Pin connected to the Pot.

NewSoftSerial mySerialPort(RXdata,TXdata);

void setup(){
  pinMode(ArmButt, INPUT);        // set "ARM" button pin to input
  pinMode(GoButt, INPUT);         // set "GO" button pin to input
  digitalWrite(Fuss,LOW);         //OPEN the fuse circuit.
  digitalWrite(ArmButt, HIGH);    // turn on pullup resistor 
  digitalWrite(GoButt, HIGH);     // turn on pullup resistor 
  delay(10);                      //Wait for Serial Display startup.
  mySerialPort.print("v");        //Reset the display.
  mySerialPort.print("z");        //Brightness Control.
  mySerialPort.print(0x40,BYTE);  //3/4 Intensity.
  mySerialPort.print("w");        //Decimal Point Control.
  mySerialPort.print(0x10,BYTE);  //turn on the colon ":".

int  DownCntr;                    // down counter (1/10 Secs.)
int  Go=0;                        // Stopped

void loop(){
    Go=0;                         //ABORT!!!
    tone(BuzzPin, 440, 1500);

  if (DownCntr > 50){
      if (DownCntr % 10 ==0)tone(BuzzPin, 1000, 50);  //Tone every second.
  else if (DownCntr % 2 ==0)tone(BuzzPin, 1000, 50);  //Tone every 1/5 second.

  if (DownCntr ==0){
    //------------------ ROCKET LAUNCH! --------------------
    tone(BuzzPin, 440, FuseTIME);  //Launch audible signal
    digitalWrite(Fuss,HIGH);       //CLOSE the fuse circuit
    digitalWrite(Fuss,LOW);        //OPEN the fuse circuit.
  while (millis()% 100);        //Wait until the next 1/10 of second.

void WaitGO(){
  while(!digitalRead(GoButt));  //Debounce GO button.

void ReadTimer(){
  DownCntr = map(analogRead(SetPot), 0, 1023, 5, 60);
void ShowTimer(){
  String seconds = String (DownCntr, DEC);
  while(seconds.length()<3)seconds= "0" + seconds;     //format to 3 numbers.
  mySerialPort.print(seconds);                         //Write to Display.
  mySerialPort.print(" ");                             //Last digit off. 

void WaitARM(){
     mySerialPort.print(" ");    //Turn Off Digits.
     ShowTimer();                   //Show Digits.

  tone(BuzzPin, 2000, 150);
  tone(BuzzPin, 2000, 150);
  tone(BuzzPin, 2000, 150);

  while(!digitalRead(ArmButt));  //Debounce ARM button.


Moderator edit:
</mark> <mark>[code]</mark> <mark>

</mark> <mark>[/code]</mark> <mark>
tags added.

Read this before posting a programming question

Please edit your post, select the code, and put it between [code][/code] tags.

You can do that by hitting the # button above the posting area.

You need to be more specific about what does not work. What was working that now does not work any more?

The problem was my 7-Segment Display. Just giving random figures, and can’t adjust it with the potentiometer. If you copy my code and try to compile it on latest version 1.0.1 you would get an error.

This was my error “As of Arduino 1.0, the ‘BYTE’ keyword is no longer supported. Please use Serial.write() instead”
I come across this guide.

Following the guide… and help from a fellow name Strel0k on reddit.
I changed Serial.print(val, BYTE) to Serial.write(val) and changed the lines:

#include <NewSoftSerial.h>
NewSoftSerial mySerialPort(RXdata,TXdata);


#include <SoftwareSerial.h>
SoftwareSerial mySerialPort(RXdata,TXdata);

and managed to get it to compile successfully…

for now :fearful:

Generally if you can get it to compile it should work like it did before, so good luck.