Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Arduino and CMD output

Status
Not open for further replies.

shosh

Member
does anyone know if its possible to establish a serial connection the the arduino uno board and have it output to cmd.exe instead of the built in arduino serial monitor? I haven't found any libraries in C++ for the arduino.
 
Not sure what you're trying to do.. If you mean, communication with an application running on the PC, then Yes! I run a VB6 program that talks to the arduino.. Also hooked it up to Blender via python...
 
yea thats what im basically trying to do, have the arduino basically communicate with a c++ program. As Im progressing in babysteps with running applications with and arduino, I simply want to be able to write a command line program and have the arduino send something like voltage values and have it output on the command line screen.
 
Out of topic kinda, sorry for hijack, but can an arduino receive input signals from sensors, and write that data to a Mysql database in real time?
 
Well put it this way.... I can write an application in VB to access a database.... I can also write a program that communicates with an Arduino So yes it is possible.

Using C# would be easier... Whats your plan BioniC.
 
Yeah i get that, but that's not realtime. Or is it? can both of those programs keep up with fast entries? like say from, a distance sensor(encoder) that rapidly changes
 
It would be the same program... The application would wait for the bytes of data from the Arduino.. Then Shunt it straight into the database.. The only latency will be the transfer, which you can't really get round. Even if you made a device connected to the USB, you would still need an interface to move the data.
 
Ah, i thought that writing to a db is fast? Coz i noticed that one can have time up to nano seconds, so i thought that means it is capable of writing to a db at that speed aswell. So when you say latency, any idea how much we are talking about?
Also, Maybe i could use some of the memory the arduino has and have all the data stored on the arduino first, as soon one instance of rapid distance change occurs, it saves on the arduino, then like 1 second afterwards it sends it to the db
 
Think of it this way.... A digital storage scope will allow you to see MANY samples of a signal up to 100mhz. You will never be able to see the signal if it were real time. You let the micro sample the signal input... Store, Send then into the DB.... Depending on the speed of your sensor, you may miss signals if its going too fast.

I have a payout meter I use two inductive proximity sensors that determine speed and payout of winch ropes.. As the sensors are rated at 2khz max.. I don't need to worry about missing counts. A small 8 pin micro decodes the quadrature signal and passes count and direction to another micro to process, at this stage storing distance and speed is very easy.

How fast is your signal?
 
Say, i would like to have 6000 sample points in 1 second. Like you said, i could possibly do this not in real time, instead storing it, then writing it to the db. Then i won't miss any points, if the data gets sent to the db 1 second later it is fine :) but real time is what i would prefer.
For example, i want to have a graph that displays speed and movement on a screen of a piston, and if the piston moves 1mm, i would like that 1mm distance change to be shown in real time on the screen
 
Last edited:
hi, me again.
so ive been scouring looking for some examples to try and get the arduino to communicate with the pc. so far I've no luck. the most experience i have is using existing library files to call a function to acquire data. Is there a good simple example you can point me to specifically for the arduino?
 
Last edited:
@BioniC! 6khz isn't very fast at all. Read the sensor in an interrupt, and when the correct amount has been read, send then by serial to your DB.

@shosh! Its your thread. The best tutorial site I've ever encountered is "tronickstuff" .
Loads of examples.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top