Arduino Forum

Using Arduino => Interfacing w/ Software on the Computer => Topic started by: andrewqin47 on Feb 03, 2017, 05:54 am

Title: Need help and advice: send message from arduino to computer
Post by: andrewqin47 on Feb 03, 2017, 05:54 am
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?
Title: Re: Need help and advice: send message from arduino to computer
Post by: PaulS on Feb 03, 2017, 06:19 am
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.
Title: Re: Need help and advice: send message from arduino to computer
Post by: Robin2 on Feb 03, 2017, 09:42 am
This Python - Arduino demo (http://forum.arduino.cc/index.php?topic=225329.msg1810764#msg1810764) may be of interest.

But experiment with the Serial Monitor first.

...R
Title: Re: Need help and advice: send message from arduino to computer
Post by: pert on Feb 03, 2017, 02:23 pm
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.
Title: Re: Need help and advice: send message from arduino to computer
Post by: andrewqin47 on Feb 05, 2017, 09:29 pm
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!  :)