For this week’s assignment we are to communicate with a computer with our pic chip via the serial port. In the last week’s lab I used a potentiometer instead of a switch to turn on the led, so this weeks lab was quite simple requiring nothing more than code midification. I must say it was quite amazing to see those numbers run down the screen in hyperterminal.
Here is the code I used:
‘ PicBasic Pro program to display result of
‘ 10-bit A/D conversion through serial at 9600 baud
‘
‘ Connect analog input to channel-0 (RA0)
‘ Define ADCIN parameters
DEFINE ADC_BITS 10 ‘ Set number of bits in result
DEFINE ADC_CLOCK 3 ‘ Set clock source (3=rc)
DEFINE ADC_SAMPLEUS 50 ‘ Set sampling time in uS
ADCvar VAR WORD ‘ Create variable to store result
TRISA = %11111111 ‘ Set PORTA to all input
ADCON1 = %10000010 ‘ Set PORTA analog and right justify result
Pause 500 ‘ Wait .5 second
main:
ADCIN 0, ADCvar ‘ Read channel 0 to adval
serout2 PORTC.6, 16468, [DEC ADCvar, 13, 10] ‘ print it to serial out,
‘ with linefeed and carriage return (10, 13)
GoTo main ‘ Do it forever

Have sensors built into the doors that will measure sound.

Gives people personal space.

Used for shared/couple sitting
Using the setup() and draw() function make a simple shape, circle, triangle, rectangle, move around the applet window/ and/or play with changing colors based on some set of conditions.
Add variables to your creature/car/construction so that it can appear at different positions on the screen.

For our second Physical Computing lab assignment we had to program a pic chip using a version of Basic.
Day 1
Last night I was able to get a LED to blink by writing the following code:
‘Define the clock speed
DEFINE OSC 4
‘These are the ports i’m working with
OUTPUT portb.1 ‘34 Pin Number
OUTPUT portb.4 ‘37 Pin Number
OUTPUT portb.7 ‘40 Pin Number
‘Start Main Function
main:
’ Turn on Port 1
HIGH portb.1
’ Leave on for half a second
PAUSE 500
’Turn off Port 1
LOW portb.1
’Turn off for half a second
PAUSE 500
’ Go back and repeat
goto main
Seems simple, but the most difficult portion of the Lab was setting up the bread board. After receiving help from other students in the lab I had the board setup in 2 hours of course I also had to solder and wire my switch (I didn’t use a switch in assignment 1). The programming took about 15 minutes.
Day 2
Today I disassembled my board to make sure i knew what was going on and to aslo add and program my switch. Reassembling my board was really helpful and I feel like I have a much clearer idea of what’s going on. Here is the code I used to turn the LED on and off with the switch:
input portb.0
output portd.1
main:
if portb.0 = 1 then ‘ if the switch is closed on pin RB0
low portd.1 ‘ set pin RD1 low
else
high portd.1 ‘ set RD1 high
endif
goto main
I also added a potentiometer to fad the LED when the switch was on, I was going to attempt to start next weeks lab but decided to wait.
I decided that I should write a entry today since we have to show our website/journals for Communications Lab.
I’ve been reading Marshall McLuhan’s Understanding Media - The Extension of Man, we were required to read chapters 1, 8 and 9, but I’ve been reading the entire book. This is a very insiteful book that I’ll probaly read again after I finish (it’s a bit of a hard read). It’s amazing that it was written in the 1960’s and how it applies to so much of today’s media including the Internet. I haven’t finish the book yet, I’m currently on chapter 11 - Numbers. I wonder as I read the book what McLuhan would have thought of the Internet, especially in chapters like Roads and Paper Routes. If the discovery of paper from China “accelerated education and commerce steadily from the eleventh century, and prodived the basis for ‘the Renaissance of the twelfth century’” what will the Internet do for this century. Ahh, what a great time to be alive.
Gotta go I have class in 2 minutes.
Imagine and Discover,
Steve
I really really really need to get my new laptop! Went to the Computer store and they won’t have any 12 inch Powerbooks until Wednesday. I guess that’s what I deserve for trying to wait until Macworld Paris. Oh well. I’m just tired of hanging out in the computer cave while everyone else is having a wireless good time in the lounge.
Just a few more days and i’ll be movin on up to the SUPER LOUNGE!
P.S. You may be wondering why I am in a program like this with no computer. Well a few weeks before my journey to New York my previous vintage powerbook titanium fell off my apartment balcony.
P.S.S. Didn’t that last P.S. sound sort of geeky? And why are moves so exciting? Well, exciting if it isn’t because of a storm coming 75 miles and hour and your house flooding to the roof (i’m coming from the Big Easy aka New Orleans aka Home of Internal refugees aka Home of Jazz, Gumbo, Voodoo and Street cars).
This post is about computers more on Katrina later.
Holla,
Steve
The Web Rewires the Movement but is missing a couple of wires, that was what I got out of The Nation article “The Web Rewires the Movement†discussing the use of the Internet and E-Mail as a political organizing tool. Allowing political groups access to millions of people around the world with very little cost, instantaneously and with feedback proves the future of political organizing will definitely include an Internet component. Especially as more and more people continue to gain access and become more comfortable with the Internet.
One of the critics the article did have about using e-mail and the Internet as a political tool is that it leaves certain demographics of people, mainly lower income and non-white, out of the movement because they do not have access to the technology. Although this may not be a problem in the future, because more and more people will gain access to the Internet, it is a problem today.
After reading “What: Mob Scene. Who: Strangers. Point: None.†I begin thinking that some of the problems facing the Internet as a tool to mobilize groups politically can be solved with cell phones. Although certain groups lack access to e-mail and the Internet, almost everyone has access to cell phones, the New York Times has an article reporting the increase in cell phone usage in rural villages in Africa and how Africans will probably bypass landline telephone usage and go straight to cell phones. With most people having access to cell phones it seems that another piece of the rewiring the movement will also include cell phones, SMS and flash mobs.
By combining the Internet, e-mail and cell phones/flash mobs to mobilize people politically we may be able to solve some of the problems of not being able to reach certain economical and racial demographics of people.