Josh’s code

May 5, 2006 at 3:34 am | In Science | Leave a Comment

Strangely, I can only get half of this on the blog–is there some place where I can change the text size? Well–go to Josh’s blog for the rest!

Here’s the code Josh wrote for Secret Garden:
global [val0 val1 val2 val3 val4 val5]

to powerup
Write portb-ddr $00 ;set all of portb as outputs

loop[
setval0 (read-ad 0) ;sets value of photoresistor to variable valX
print val0
wait 2
setval1 (read-ad 1)
print val1
wait 2
setval2 (read-ad 2)
print val2
wait 2
setval3 (read-ad 3)
print val3
wait 2
setval4 (read-ad 4)
print val4
wait 2

if (val0

No Comments Yet »

RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.