Assignment 2: Fixing Issues

Ok, so I have it so the button works a lot better now. At least sometimes. I think there may be an issue with what data is actually being sent between the programs, I have arduino sending a byte but processing receives an int, and I think something is being lost in translation. I didn’t end up needing a serialEvent(), I just had to restructure some of my arduino code to only write under a certain condition. Unfortunately, that also broke the serendipitous flashing of the ingredient images to indicate that they are selected. I am just trying to figure out how to at least get the selected image to display consistently instead of just flashing once. The LEDs are much faster and don’t lag behind anymore though. Oh, and I also had to manually map the values for my potentiometer because they were not really accurate as to approximate quarters of the knob, and the values got really finicky.

I am making progress, but this is exactly why I didn’t want to try to do this before handing it in – it worked well enough on the due date.

Edit: after re-reading this, I had an idea. If I create a variable in processing that doesn’t directly receive the input data, but stores the value of the variable that does, maybe that will alleviate my issue. Or maybe that could be accomplished with the serialEvent(). I haven’t looked into it overly well yet, as I found most of my issue resolution in arduino.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s