Jim's
Tutorials

Spring 2012
course
navigation

02-29-12

I duplicated the code used to read one pin and changed a few things around so the ADMUX register is properly reset between each reading.
Right now I have my chip hooked up to two photocells, each of which controls the amount one of two LEDs will be turned on. By holding your hand over one photocell, a lopsided rhythm will be output on the two output LEDs: "...LONG short LONG short LONG short..."
I'm thinking that it would be useful to have a way of asyncronous blinking times.
My code is still really messy and I haven't put anything out into functions. I'm thinking a good next step would be to add delay and my new analog_read code into a library that my files can include.
I've attached the code for the current iteration and its not-terribly-unique makefile.
http://cs.marlboro.edu/ courses/ spring2012/jims_tutorials/ aaron/ 02-29-12
last modified Wednesday February 29 2012 12:35 am EST

attachments [paper clip]

     name last modified size
[COD]2_analog_in.c Feb 29 2012 12:34 am 2.24kB [TXT]Makefile.wiki Mar 5 2012 10:17 am 8.77kB