From graph to serial (serial to plot opposite)

Hi all! I would like to draw lines, spline and Bézier curves over a x-y graph and send values to serial.

Example: on the pc with the mouse I draw a curve on a graph representing time over x axis and position over the y axis. Pressing “enter” the pc sends values via serial and arduino changing the position of the servo based on the curve received.

I’m experienced with arduino but this is only an idea at the moment. I would like to know if someone can point me in the right direction.

Thanks for your attention

If not already done so, you can read Robin's updated Serial Input Basics thread. It might give you ideas how to receive data.

Next you can write the complementary software for your PC.

my draft tutorial on Arduino Software Solutions has a variety of codes for reading inputs from Serial with the pros and cons of each. Choose the one that suits you best

Torg: Hi all! I would like to draw lines, spline and Bézier I’m experienced with arduino but this is only an idea at the moment.

No, you're not, and it is a seriously bad idea.

If you had any experience with Arduino, you would already know this is hardly an Arduino problem, and all your woes are at the other end. The idea of drawing splines and beziers with a mouse is utterly absurd, indeed the complete opposite of their raisons d'etre. Even in the highly unlikely event that you came up with something that looked vaguely right, PC problem, all you would get is a huge wealth of vague, i.e. useless, data that you really should not show your mother.

That said, the control point data for splines and beziers is fairly trivial, that being their raison d'etre, and all you need is a PC programme that can handle the curves, and then send that data to a serial port, or local file. PC problem.

I'm sure there is no point in asking why you would want a Bezier curve on an Arduino but, considering the computing power available at the Renault factory in 1960, I guess Arduino would be able to calculate one and display it. If you've got the maths, which I doubt, but they will be around somewhere, all you need is to receive the data.

Read reply #1 again - not necessarily in the order written.