interface and application programming :
 h  o  m  e   >   >   >















conveyor belt
processing interface :
forwards / backwards :

This week we were asked to make an interface to control an input / output.

Seeing as it was Thanksgiving break and last week was quite long w machine building, I decided to take a break. I didn't get started on the assignment until Sunday evening. I hope I will have enough time to complete it.

I had some prior knowledge about Processing, so I wanted to give that a shot. I also looked at previous students' pages, and found someone who linked to this TUTORIAL.

installing library :

I downloaded Processing (I thought I had previously installed it, but I guess I deinstalled it after not using it for a while). In order to communicate with Arduino you have to add / install a library called ControlP5.

basic window :

It took very little code to make a small window.

Here the window is purple w green text. Next steps are to add buttons that communicate to my fabduino I created in WEEK 10.


basic (ugly) buttons :

Here are the buttons. The tutorial showed how you could change the font (initial detault font was v pixelated). I really don't love this color palette, so I am going to look into how to change the button color scheme...



The next steps in the tutorial linked above, begin to connect the buttons to arduino via serial. Because I am home for break, i don't currently have my board and I think I can just adjust the code I wrote a couple of weeks ago. So - I think I am going to try to make this interface a bit nice - more related to the belt. I kind of want to make a fun drawing that responds to the forwards / backwards button pressing.

adjusting window :

ok - started to adjust colors now. i'd love to have a moving conveyor belt that immitates my original drawing / diagram :

installing library :

So - I'm guessing I just need to add some lines that are static or move forwards or backwards... and I wonder if a set of objects (really just different shapes) can move according to what button is pushed...

well actually, i googled to see if there was easy code to make radiating lines, and found code to make a sun:

sun rayssss:

code here :



and by adjusting the code just a bit, i was able to get the rough sketch I was looking for :

conveyor belt:

code here :



but i kind of want to make it so that the belt moves in one direction if you press the buton and moves in the other direction if you press the other button... I also want to add some objects that are "moving" on the belt....

combined sketches:

well, for now, i was able to combine the conveyor belt graphic w the buttons. the code is getting a lil messy :



i tried making a moving object occur, but was getting pretty tripped up... i will try again, but i think i mostly definitely want to make the belt turn forwards when the corresponding button is pressed and same w backwards.

back / forth buttons working sort of :

ok - this is somewhat working, but i don't want the belt to move in any direction unless the button is actively PRESSED.

code here (v messy):


back / forth buttons working more (still sort of) :

ok - this is somewhat working,but if i press elsewhere the conveyor belt still moves... bc i'm using mousePressed vs some function that can tell whether the button is or is not being pressed. i can't seem to figure that out.

code here (still v messy):



Unfortunately my flight home was delayed and the next flight out to Boston was a DAY later... which means I will get home vvvvvv early Wednesday morning... I was hoping to have all of Tuesday to work with my board, which I left at school. So, it's likely I wont be able to get this working, but I'm happy that the interface will cause the animation to do what the conveyor belt will hopefully be doing..!