Go Down

Topic: Need help and advice: send message from arduino to computer (Read 1 time) previous topic - next topic

andrewqin47

So as a rookie who just started playing with the arduino, I setup an ultrasonic range finder with LCD display. Although now I can read the distance off from the LCD on the breadboard, I want to know if there is a way for the arduino to communicate with the computer.

In another word, when the ultrasonic sensor detects an object, I should be able to see a text such as "yes, there is an object" or "no, there is nothing". But how do I do that?

I have also attached the code. I appreciate any help on how to achieve the effect I want.

PS: Don't know why but the LCD on the breadboard is so dim and I could barely read the numbers off it. Is it the display or does it indicate a mistake I made when setting things up?

PaulS

Quote
I want to know if there is a way for the arduino to communicate with the computer.
Of course. That is what Serial.print() is all about.

Of course, that means that you need an application on the PC that is listening the to serial port that the Arduino is connected to. For testing, the Serial Monitor app, started from the IDE, can fill that role.
The art of getting good answers lies in asking good questions.

Robin2

This Python - Arduino demo may be of interest.

But experiment with the Serial Monitor first.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

pert

PS: Don't know why but the LCD on the breadboard is so dim and I could barely read the numbers off it. Is it the display or does it indicate a mistake I made when setting things up?
LCD modules usually have a potentiometer on the back you can use to adjust the contrast.

andrewqin47

Thanks guys. So I took away the LCD and use the Serial print command and the serial monitor to make the command appears. I appreciate all the tips!  :)

Go Up