Week 3

Well, I would have a picture, but the Wiki doesn't seem to be working. Well, I'll put them up later. This assignment was pretty easy, but I did get a lot of help from Carlyn. Once things were explained though, it was all very clear. I was interested to learn that you can program for PIC chips using C. I'm very interested in the this. Anyway, basically all that my program does is light one LED is the potentiometer is in certain range, and another if it's in a larger range. This, of course, could be easily expanded to a greater range of lights.

--

Week 4

I have once again been thwarted in my quest to actually put pictures up on this journal. The ER is out of cameras and my camera has run out of batteries. I suppose all I can do is comment. I found this project very frustrating, more than a little because of PIC Basic. I don't know why, but I find it completely obtuse. I ended up getting it to work and hooked up a servo motor so that the speed at which it rotates is controlled by a potentiometer. Cranking it up and making the thing dance was pretty fun. At first it didn't work, and while the bug ended up being something pretty simple, I took all the old LEDs? out of my board just in case. It's kind of sad, letting go of it all, but I suppose I had to do it at some point.

--

Week 5/6

Here we go, finally a picture. This is a project that I worked on with my friend T. He was working next to me in the lab and gradually through helping him, I started working on it as well. The basic idea is that the paddle has a vibration sensor attached to it, and when you hit something with the paddle, it sends the readings to the computer using serial out. Also, if the impact is strong enough it lights up an LED on the bread board.

main:

    High PORTD.1
	pause 100
	Low PORTD.1

    ADCIN 0, ADCvar?       ' Read channel 0 to adval
	If ((ADCvar?/2) > Threshold) then
    serout2 PORTC.6, 16468, [DEC ADCvar?/2, 13, 10]  ' print it to serial out, 
    pause 250                           ' with linefeed and carriage return (10, 13)	
    Spacer = 1

    endif

    IF (Spacer = 1)  then
    High PORTD.2 
    Pause 100
    Low PORTD.2 
    Spacer = 0
    Threshold = ADCvar?
    ENDIF

    if (ADCvar?/2 < 200) then
    Threshold  = 300
    endif

GoTo? main ' Do it forever

T worked on most of the physical stuff and I modified the basic code so that the light would only blink once at impact and not keep blinking as the sesor continued to pick up vibration from inertia. All in all it was a lot of fun, and I think I'm starting to get a hang of PIC basic and it's weird syntax.

--


Page last modified October 20, 2005, at 01:44 PM