[HELP!] I have to make a code using Tetrix PRIZM!

The guidelines for my code are this: If the distance is greater than or equal to 45 cm, the robot goes forwards. If the distance is 25 cm or less, then the robot must go backwards. I already know how to (sort of) use 'if else' statements but am not sure how to phrase this. Note: I am relatively new to coding as a whole.

if(distance >= 45) {
  // go forwards
}
else if(distance <= 25) {
  // go backwards
}

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Do you have any code written yet?

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

What is a Tetrix PRIZM?
Can you post link to specs/data?

Thanks.. Tom.. :slight_smile: