Can someone help me update these code into 1.0.1.

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);

to

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

and managed to get it to compile successfully...

for now :fearful: