Programming for sensors

please use the # button when posting code. It provides [ code]

tags that improve radability.

Also good for readability is consequent indentation. In the Arduino IDE you just press CTRL-T (windows)

and mine isn't working. Please help!

What did you expect for behavior? and what does it do? or not do?

YOu could rewrite the same code in Arduino language. HIgh level languages are made for a purpose :wink:

void setup()
{
  inputMode(7, OUTPUT);  
}

void loop()
{
  int y = analogRead(0);
  if (y < 200) 
  {
    digitalWrite(7, HIGH);
  }
  else
  {
    digitalWrite(7, LOW);
  }
}