Go Down

Topic: How to detect a Arduino Mega chip is connected (Read 851 times) previous topic - next topic

rockhoppers1964

Looking for some help please.

Writing a visual basic 2012 program to take data from an Arduino Mega connected to one of my companies robots.
This is new territory for me !

Have the serial port connecting fine and downloading the data, all working great.
However is would like the program to scan the serial ports on the PC and "ping" each one for a Arduino Mega chip.


This is what i have at the moment, the question is what do i replace the X with to get a responce from the ship, and what would that responce be ?

Thanks in advance for any help and advice.

Andrew

With SerialPort1
            .PortName = ComPort
            .BaudRate = 19200
            .Parity = IO.Ports.Parity.None
            .DataBits = 8
            .StopBits = IO.Ports.StopBits.One
            .ReceivedBytesThreshold = 1
        End With

        SerialPort1.Open()

        SerialPort1.Write("X")

PaulS

Quote
This is what i have at the moment, the question is what do i replace the X with to get a responce from the ship, and what would that responce be ?

The chip itself will never respond. You must write some code to load on the chip to respond to a request. The X will then be whatever you have programmed the Mega to respond to, and the response will be whatever you have elected to respond with.
The art of getting good answers lies in asking good questions.

Go Up