Import servo angles from excel file to arduino

Hi guys,

I've been reading up on serial port communication however didn't find the exact answer to my question. Seeking some advice here.

I'm currently building a 2D delta robot that's controlled by two servo's. I did all the math resulting in two sets of angles for each servo at any given time.

I really want to have my arduino read these angles from a file; csv, txt, excel, since i have over 300 lines of angles that might still change depending on design changes along the way.

I have written some basic code to control my arduino. the value for the angle is now a constant input. How can I make this a variable read from a file on my computer?

If i missed a previous post on this subject while browsing this forum, kindly refer me. Else, please help!

Kind regards,

Didier

The arduino can't see your PCs filesystem, so you cannot read directly from your csv file. There are various ways to achieve your goal.

You can write something in your language of choice on the PC that communicates over serial and passes the data to the arduino, either on demand or all at once. For a small arduino, that's a lot of RAM consumed though.

You can write something on the PC that takes the csv, transforms it into C array declarations and writes it to a file that is a part of your sketch. You can put the datapoints in progmem to save RAM

Buy a shield with an SD card reader and read the csv from there.