Saving your work in Processing
Important Tip:For the Export Application option (under file), app folders are erased & re-created every time you use the command. Move the folder someplace else if you dont want it ERASED before you use the option again.
Just typing in the code from the hardcopy book (2nd Ed. Make: Getting Started with Processing by casey Reas & Ben Fry, p. 195, Example 13-7: Read Data from the Serial Port) I noticed the error message appears at the bottom of the console stating a missing right curly bracket "}" until I completed the program:
Programming in C:The strategy I used involved gathering various lines of Neil's C-code from the following assignment weeks to make my own, unique program:
Here's my C-code:
When programming, I used the latest version of Ubuntu as my operating system and wrote the C-code in its g-edit text app.
The LED didn't turn on after being programmed and the character output was weird when I checked in the Arduino serial monitor:
Because I had designed my board as both an input and an output device, I needed to also edit the make file, based on the micro-controller I decided to use, since I re-designed Neil's Button/LED board. The routine was being performed, but not as how I theorized... .
The fuses needed to be set to handle the timing, the make file needed a line of code for the LED AND I had placed the wrong value resistor on my board. 499 ohm IS NOT 499K ohmSolutions
Here's the terminal output:
Please note the following:
The make file is specific to the processor.
If your board layout doesn't match Neil's according to
the make file, check and edit according to YOUR layout
6pin headers have a programming orientation!!
The ribbon cable housing must fit on the pin headers
in the SAME DIRECTION.
The terminal output for programming the fuses and loading the program on the micro-controller uses the external crystal (which is set by default to run at 1mhz, to run at 20mhz, fuses must be set) for timing.
I loaded the corrected LED program to the board via my programmer.
Here's my edited make file:
I opened the serial monitor (Arduino IDE for Ubuntu), set the baud rate according to my C-code program:
Another note on Make Files:
Programming in Python:I retrieved Python code lines from the the Input Devices week (via the communication program) using Neil's term.py code as a template to create my own (as I did with the C-coding). I used the Ubuntu terminal to run my program, then the Arduino Serial Monitor to view the results.