Using data from 2 sensors to map data on a stepper motor plotter

Hi

Just wondering where to start with my project, im a beginner in coding and arduino so any help would be greatly appreciated

Im proposing 2 possible outcomes so far for an art installation I am building:

1 - data from 2 different sensors (for now lets say light and sound levels) to then be converted into XY coordinates on my polargraph plotter that I already have built. Each coordinate it will draw a small circle.

2 - The plotter moves in a predefined pattern (up and down the page drawing straight lines
) and the data from the 2 sensors interfere with the movement to create sideways movement (so it will look a bit like a sound wave)

my polargraph is built on an arduino uno and an adafruit motor shield v1. I control it via a program built in processing - https://www.instructables.com/id/Polargraph-Drawing-Machine/ but im guessing I cannot really use this software and would probably be easier to just code it from fresh.

where to start :slight_smile:

So you have no Arduino graphics library for your plotter, and want to write your own one?

www.instructables.com

Uh-oh

The Instructables website is a PITA to read.

Can you explain what you can do with the existing plotter software?
How do you get it to draw a circle or a square?

Maybe all you need is to use the sensor data to generate instructions for the existing software.

...R

You can draw a circle by uploading a vector image and it will trace that.

You also have a manual command where you click on the screen to tell where you want the pen to move.

I made a quick video to explain it here - https://drive.google.com/file/d/0B1OB2QEj0zjhaGM3QTNQNERWZmM/view

Do you want to write code for Processing or for Arduino?

DrDiettrich:
Do you want to write code for Processing or for Arduino?

honestly, whatever is easiest as I dont have much experience myself. Im just looking to get a working prototype up and running asap to show the venue.

What would you suggest?

If you understand the Processing code, you can change it to also read the sensor values from the Arduino, and plot them as you like.

Else you may be better off with writing Arduino code, starting with a simple MoveTo function. and then add your own drawing.

I've looked at the video and it is very clear.

Presumably the Processing program sends data to the Arduino that is controlling the motors.

It seems to me you have two broad options.
A. find some automated way to send codes for the move to the Processing program. I have no idea how to do that.
B. find out what the Processing program sends to the Arduino and write a different program to send the same sort of thing to the Arduino.

My guess is that the interface between Processing and the Arduino is relatively simple and it should be possible to determine it by studying the Arduino code. You may even be able to get simple things to happen using the Arduino Serial Monitor.

I am assuming (but I don't think you have said) that your sensors will be connected to a different Arduino and not to the one that is controlling the drawing process.

...R
PS I bought some cord with the idea of making a polargraph but the project never got any farther than that :slight_smile: