Saturday, December 12, 2009

Many Ways to Program Switches

;simplest way, one switch
to go
waituntil [switcha = 1]
motor commands
waituntil [switcha = 1]
more motor commands
end

;another way, one switch
to go
if switcha = 1
[motor commands]
if switcha = 0
[more motor commands]
end

;another way, one switch
to go
ifelse switcha = 1
[motor commands]
[more motor commands]
end

;two switches!
to go
if switcha = 1
[motor commands]
if switchb = 1
[more motor commands]
end

Tuesday, November 17, 2009

Programming a Switch

I've been working with RobotC for a bit now and I've come to realize something about the way switches can be programmed in Logo. Logo allows you to write this implied boolean equation with if switcha [a, on] or if not swticha [a, off], while boolean equations are true or false or 0 or 1 in other programming languages. So I tried programming a switch with if switcha = 1 [a, on] and it worked just as well. I much prefer that approach because of its similarity to most other programming languages.

Learning Through Discovery


One of my 9th grade students was making an important discovery, an instance of self-guided learning with the cricket logo console. She had 3 separate procedures that controlled different aspects of her dj robot--one spun the turntables, one set the dj's arms in motion, and one displayed a message on the LED display. She hadn't been taught how to crate a main procedure that calls all of the other three, so she was typing the name of each in the command center and beaming them to the cricket in turn to make them start up individually. I thought that was a very inventive way to get it to do all three of its procedures without knowing the 'right' way. Of course when I showed her the usefulness of a main procedure she got it right away because it was immediately useful.

Monday, July 27, 2009

Do It Yourself video

Here is my final (for now) version of my technology video. It focuses on encouraging my students to experiment with technology, not to be afraid to break it.

Thursday, July 16, 2009

Building Better Robots Podcast No 1


Welcome to the first episode of the Building Better Robots podcast. This podcast is designed to supplement my 9th grade robotics class in which we are building and programming Super Cricket Robots with Legos and the Logo programming language. But even if you're not taking the class, you might get some good tips out of it. In this episode I'll be talking about how to get the most out of this podcast and I'll introduce some of the specific topics coming up.

Thanks to Flickr user Brandy Shaun for the Lego photo, Flickr user Steve Kay for the Optimus Prime photo, and the music is brought to you by Elysis Raudenbausch, Breakdown Easy, available on Wikimedia Commons.

Friday, February 13, 2009

Cricket timer

Here's a simple program to make a timer with an LED. A couple of my 9th grade students applied and modified my base program a bit to get theirs to work with a switch you can see in the video.





global [number]

to start
loop [
if switcha [
count
]
]
end

to count
setnumber 1
repeat 60 [
display number
wait 10
setnumber number + 1
if switcha [wait 5 stop]
]
end

Sunday, January 11, 2009

Giving up on Jackal

My 9th grade robotics class has really liked the syntax coloring Jackal provides for our cricket microcomputers. But after a lot of frustration I've abandoned Jackal in favor of Cricket Logo. CL is much more stable, especially transmitting data to the cricket. We now get very few errors, and this was driving my students crazy with Jackal. As a result we're really working on properly indenting programs as a way to make them more readable.