The next snag was getting Processing to communicate with the Arduino. After a web search, Charley found that in Mac OSX, a Terminal command was needed to get access to the serial ports. After that we got the program to run as intended and started to change parameters in the code.

After some fun moving the ball around in the box, I thought that it would be neat if the ball could draw. Charley, having taken a class about Processing, fiddled with the code so that the ball would draw. Lucia then added to the code so that the ball had further range of motion and then I adjusted the size of the ball as well as the size of the drawing space to compensate for the potentiometer range.
When we initially wrote the code, we were using a pot and a photoresistor. I decided that the photocell didn't give enough precision when drawing so I swapped it out for another pot. Knowing that this week's topic was enclosures, I whipped up a little box to hold the breadboard and attached some knobs on the pots so that the controls would be easier.

before.

after.
Here is a video of the application in action.
No comments:
Post a Comment