Seonghee Kim
13. Interface and Application Programming
 

previous next

Week13

Assignments

-group assignment

compare as many tool options as possible

-individual assignment

write an application that interfaces with an input &/or output device that you made

Hardware and Softwares used

-arduino IDE
-Processing
-Python

Outcome

Studied processing and python. Designing GUI and coding input board to work.

Processing

download and install processing

Since I only have a basic knowledge on programming, I decided to make GUI with processing. Processing is very similar with arduino because arduino originally based on processing.



-Download and install Processing here

Basic command for processing


setup()
-
The setup function run once when the program starts like arduino setup().
draw()
-the draw function continuously executes until the program is stopped like arduino loop().
print()
-the print function writes to the console area, the black rectangle at the bottom.
size()
-the window size width and height in units of pixels. the size() function must be the first line of code inside setup.
background()
-set background color of the window.
fill()
-fill the color of the shape.
stroke()
-draw borders of the shape.
rect()
- Draws a rectangle.
ellipse()
- Draws an circle, oval.


-more referances for command.

Processing and Arduino

-click here to know how to connent processing with arduino.


First, I tested to arduino. I coded when mouse clicked, led turns on and off and the window color changes black and whitein in order.



-Click here to download files(arduino_proce.pde, arduion_processing.ino)



Processing Utrasonic Sensor



- I have to change above 2 lines. Erase mySerial.println("cm"); because I only needed distance value for porcessing code. and changed print to println to send '/n' to processing code.

-Click here to download files(distance_seong.pde, fab_distance.ino)





up previous next

Date: 2018-04-24
Author: Seong Hee Kim @ Fablab Seoul