How to use Comunication Data with USB on Arduino Uno

please help me :~

I've been looking for references in various places. and I have never found a way to make the program counter using visual Basic 2008 with Arduino as an input to the counter, and use usb as data communications. I use arduino uno. Do you have a solution to solve my problem?
I really need it soon. :fearful:

Why do you insist on using VB? Visual C# is equally affordable, and makes it easy to connect to the serial port, and read and write data to/from it.

Hi,

I am a newbie, but a man too old as to remember times in which, to communicate to an old RS-232 port, it was so easy as typing (in BASIC) "open "COM1" as #1 input" (or somethig similar).

Questions: ¿there exists something similar in the 21th century? :~

If not: ¿is there some simple code that an old programmer can use to get data form the arduino and have it in excel?

As we say in spanish: "os guardaré eterna gratitud" (I shall be grateful forever) :smiley:

thanks

there exists something similar in the 21th century?

In C#, it's nearly that simple.

is there some simple code that an old programmer can use to get data form the arduino and have it in excel?

Excel implies Windows. There is a library, and PC application, called GoBetwino, that might be of interest to you.

Thanks Pauls.

I've never used C, but I don't think that it's going a problem. The question, maybe, is about a more general subject: "Excel implies Windows" means that using C does not use wimdows?. In other words: If I create a plain text file usin C: can I read it form a windows based app (say excel or vb program)?.

In the meanwhile I'm familiarising whit the arduino: I've tried this program:

int incomingByte = 0;   // for incoming serial data

void setup() {
        Serial.begin(9600);     // opens serial port, sets data rate to 9600 bps
}

void loop() {

        // send data only when you receive data:
       
                // read the incoming byte:
                incomingByte = Serial.read();

                // say what you got:
                Serial.print("I received: ");
                Serial.println(incomingByte, DEC);
      
    }

that i've derived from one of the examples just to (try to) see the message in the monitor window. It gives an error mesagge: "No device found in COM3".

On the other hand, the arduino programming window says at the low rigth corner "Arduino Due (Programming port) on COM3". The windows hardware control panel says that the programming port is COM16 and the native port -that I've just connected- the COM20.

I feel absolutely lost (and ashamed) :blush:

Thanks again

C is a programming language. It can be used to develop applications that run on a variety of operating systems, like Windows, OSX, Linux, Unix, Solaris, HPUX, SunOS, mainframes, etc.

Excel is one such application, written for one specific operating system (Windoze).

That code runs on the Arduino. It can NOT possibly display the error message that you quoted. You should avoid using pronouns like "it". Use nouns, like 'the Serial Monitor" or "the Excel application".

On the other hand, the arduino programming window says at the low rigth corner "Arduino Due (Programming port) on COM3". The windows hardware control panel says that the programming port is COM16 and the native port -that I've just connected- the COM20.

The Due has two ports - one for programming and one for serial communication. It's important to use each for it's intended purpose.

You aren't trying to have you C application program the Due, are you?

I reply myself:

The problem about te COM3 is not a problem at all: just changing the serial port to COM16 (fell ashamed again).

So the question does not remain the same but: what if I want to use the "Native" port?. Is it "serial1"?.
Can I open a window to monitorize COM20?

Thanks

Pauls,

I was writing the last post while you answered the other one.

I have to learn the jargon: the message appeared on the lower -black- section of the "arduino" window -the one that allows you to edit and send code to the arduino-

Actually the code is working.

Back on the main subject (getting data form the arduino and passing it to an windows app): I have some experience on programming excel and autocad whith vb and, for the project that I'm trying to developpe, it would be sufficient if I can write a programm -using C or whatever language (or tool) easy to use- that opens the port, listens to it and writes a txt file. Although the whole system (arduino, interface programm and the app in windows) is going to work on a "real time" basis, the arduino is just going to listen to a human pressing buttons (or toggling switches), then "serial sending" the binary information; the program in the PC modifing -and closing- the -text- file every time the human switchs a switch (and the arduino informs) and, finally, the app doing something depending on the human action.

Thank you for your answers

it would be sufficient if I can write a programm -using C or whatever language (or tool) easy to use- that opens the port, listens to it and writes a txt file.

C# is perfect for this.

OK.

I'll try.

Thanks again.