98Views2Replies

Author Options:

What is the code needed for having an arduino desplay inputs from sensors onto the computer screen? Answered

i require some code for an arduino so that when i use a sensor the inputs from the arduino can be monitered from the computer screen

Discussions

0
None
maewert

Best Answer 7 years ago

The Arduinos can send data over an TTL-level RS232 port using the internal UART.  The computer screen can display this serial data.

Very simply:

int sensorValue = 0;
void setup()
{
  Serial.begin(9600);
}
void loop()

  sensorValue = analogRead(analogInPin);
  Serial.println(sensorValue);
  delay(10);
}


The Arduino development environment comes with a Serial Monitor that will display the results.

Best Wishes