week 12: interfaces and application development

This week we learned about various options for developing desktop graphical user applications and how to interface them with hardware that we build. This week, I wanted to experiment with Processing since I had never used it before, and decided to build an interface for the CNC laser drawing machine that I made last week. I wanted a way for a user to be able to draw a picture on the screen and upload it to the laser to have it draw it on the picture frame.

After a relaxing Thanksgiving break and a throw back 90's Nerf war with the cousins, I headed straight to lab to get back to serious work.

Since this week wasn't about building hardware, I just used an Arduino to control my laser.

I plugged the servo motors into the PWM pins, and rewrote the code I wrote last week to use the hardware Servo.h library instead of the SoftwareServo.h library which the attiny44 needed. I also added code to check the serial port for incoming coordinates from my computer and to draw whatever coordinates are received.

I then wrote an interface in Processing, in which you can click on dots representing pixels to draw an image. There are buttons to clear your drawing, start a new path, and to send what you've drawn to the laser over the serial port.

And here's a video of the whole chain of events.