Arduino Cant Do Math, Baud Rate Is Wrong Help Urgent

Hey guy so really weird. As of last night My arduino cant do math. I do just integers and do any math but if I pull a pin value into the equation it just says zero. Here is my code I have used these exact equations on this board in other sketches and they work fine. This is just a pot that adjusts a PWM signal out, super simple. Map function shows as will as the sensor value but no math???? Even the serial delay with no actual delay, I have used this exact one a million times and it doesn't even print, I have to use a real delay() to just see whats happening.

int  pwm = 9;          //POT IN 
int Delay = 800;
int PrevMillis =0;
int BitIn = 0;
int VoltageIn= 0;
int conBit = 0;
int Time = 0;

void setup() {

  pinMode(pwm, OUTPUT);

void loop() {
  Time = millis();
  // set the brightness of pin 9:
  BitIn = analogRead(A0);
  VoltageIn = BitIn*(5 / 1023);
  conBit = map(BitIn, 0,1023,0,255);
  analogWrite(pwm, conBit); 

  if(PrevMillis - Time >= Delay){       //I Know for a fact this works WTF??
    Serial.print("BitIn \t");
    Serial.print("VoltageIn \t");
    Serial.print("8Bit \t");
    PrevMillis = Time;

I have tried a 2 different adruino ide's, 3 different boards,two different usb programmers, and every way i could thing of to re-arrange my equations.

About the baud rate-I have it at 9600 as you can see but it has to be at 19200 for it to read. is monitor is set to 9600 i get jibber jatter.. Please Help


You're running the chip at one speed (probably 16) but you have selected a board running at half that speed, so everything runs twice as fast as it should.

And, 5/1024 is zero in integer math. If you want a float, do 5.0/1024

  if(PrevMillis - Time >= Delay){       //I Know for a fact this works WTF??

You have that backward. It should be:

  if(Time - PrevMillis >= Delay){       //I Know for a fact this works WTF??