Sunday, August 2, 2015

Soft Circuits Workshop

Attended a workshop on July 29 titled To Code and Beyond: Soft Circuits. Workshop was led by Dr. Kylie Peppler of Indiana University.

It was a rushed four hours, but I'm excited to further explore the concepts and techniques I heard about. First off, soft circuits is related to physical computing. We worked with electronic and electrical components attached to textiles (felt and t-shirts) using conductive thread connect piece to piece. There is a lot more subtlety to the concept that can be covered in a short workshop, but we focused on LilyPad Arduino microprocessors.

So now I'm working on my first solo project.

I've attached the LilyPad to an old shirt. As you do this, you have to think about the "wiring" that will eventually connect other components sewn to the shirt. I've chose to put the ground (negative) terminal to the top, thinking I'll route all the positive connections low, and then have all the components share a bus back to the negative high.

I'm not sure how expensive conductive thread is (we got a couple bobbins of stainless steel thread on leaving the workshop) but, to save I've attached the LilyPad using normal polyester thread. Note I've used an embroidery hoop to hold my surface flat. I've attached at the negative terminal, and digital terminal 11. From here, I'll use conductive thread.

I'm also not sure what will happen with the battery. The Arduino needs power, but that lithium ion battery shouldn't be just dangling. On the other hand, I need to be able to detach it easily for washing, so I can't sew it firmly in place. Needs some thought.

Saturday, April 18, 2015

Learning Ruby part III

Starting flow control.
If statements.
Behavior as expected. Note the comparison operator uses double equals ==. A single = is an assignment operator.
Note that elsif is not spelled correctly. That took me a while to realize why the code didn't work right.
unless checks for false value, opposite of if
exclamation as a prefix is like "not" -- != means "not equal"
&& conjunction
|| disjunction
How to use if, else, and elsif
How to use comparators / relational operators like ==, !=, <, <=, >, and >=
How to use boolean / logical operators like &&, ||, and !

String control with a daffy duckifyer. gsub

Check substrings .include?

Starting loops
while, until, for
no increment operator like ++ or --
instead, uses += with an delta value
range in 1...10 (exclude the end value) or in 1..10 (include end value)

loop method -- the iterator
break to exit a loop
next to skip an iteration
arrays to store multiple values
another iterator .each

Learning Ruby part II

Basic tutorial at code.org was just that -- basic.
Now I'm trying their next tutorial, which seems to deal with input and string manipulation.

gets accepts user input
gets inserts a blank line after the input. the method .chomp removes the line
gets.chomp accepts user input without adding an extra line

Monday, April 13, 2015

Learning Ruby part I

I have been given a task which requires I learn Ruby. I will try.

I've installed Ruby on my laptop (from links at ruby-lang.org). I found a tutorial on code academy. So I'll see where this leads.

notes:
data types: number, boolean, and string
assignment operator: equal sign
exponentiation: **
modulo: %
print: sends to screen
puts: adds blank line after screen output. hmmm?
I see. print leaves the next output right there, puts goes to the beginning of the next line.

strings have .length
and .reverse
and .upcase and .downcase

hashmark for single line comments
=begin to =end for multi-line comments

Saturday, March 28, 2015

Why I'm Uneasy With Nerds On TV

I am a nerd. I scored very well on SAT, GRE, GMAT, and Praxis tests, and generally can perform well on standardized measures. I enjoy working mathematical puzzles. I think precision and accuracy in language is important.

But as far as I know, I am nowhere on the autism spectrum. I have many normal social interactions. My speaking voice is neither whiny nor squeaky.

I do not use suspenders to hold my pants with the waistline above my navel. Nor is my inseam so short as to reveal my socks when I stand. I wear eyeglasses neither held together with tape nor featuring lens diameter outsized for my face proportions.

As a math teacher, I hear many colleagues speak glowingly of TV shows which have a "nerd" as leading character. They say they like to see smart people cast in a positive light. They assume these shows are my favorites.

But I am uncomfortable with what I've seen of these shows. I find the caricature of "smart" people demeaning. I dislike the implication in the writing that "smart" is an innate quality and cannot be developed. I question the choice to cast smart people, with possible exception of the lead, as physically unattractive.

My school holds a Spirit Week each year for seniors, where each day is devoted to some theme. Last year's Spirit Week included a Nerd Day. Most of my seniors came to school dressed in some ridiculous stereotype portrayal of "smart person." I wrote to my principal and suggested that, perhaps, this was not the correct message to send to our students -- that being able to perform academically makes one a target of ridicule. I think we should celebrate our students who achieve, not hold them up for derision.

Sunday, November 30, 2014

Crane and Turtle

Over Thanksgiving dinner we were discussing a calculation that had come up, and my wife (born and raised in Japan) commented that it was a "tsuru-kame (crane and turtle)" situation. My son and I, both puzzled, asked for an explanation of what a crane and turtle situation was. My wife was surprised I had never heard of it, and proceeded to try to explain the calculation algorithm. Unfortunately, too many years had intervened between her middle school, where she learned the technique, and the dinner, and she couldn't quite explain.

So we all looked it up later, and I, in the process, learned some interesting cultural tidbits, and also learned another algorithm for solving what I call coin problems. You've got some number of things with one value associated, and some number with another value, know the total number of things, and know the total value. Find the number of each item.

This is a typical lesson in New York's Algebra curriculum. It appeared in Integrated Algebra, Math A before that, and, I assume, in whatever name they gave Algebra before Math A. I assume it's in CCLS Algebra, as well. We teach to solve using the technique of simultaneous equations and substitution.

The Tsuru-Kame method (鶴亀) takes a different approach that seems more like using area to solve.

Let's pretend we have a bunch of cranes and turtles, totaling 10 animals. Let's also say that there are 34 legs all together in this menagerie. Cranes each have two legs, and turtles have four. So the difference between them is two legs. If we were to assume all the animals are turtles, we'd come up with 40 legs. This is six extra legs than we actually have. Divide that six by the difference between crane and turtle leg count (2) and we get three. So that is the number of cranes. Which means there must have been seven turtles. (Check: 3 cranes @ 2 legs is 6 legs, 7 turtles @ 4 legs is 28 legs, for a total of 34 legs. It works.)

This method avoids algebra, but is pretty intriguing to me. I am almost always happy to learn a new algorithm.

Thursday, September 4, 2014

Twelfth Period

Back in June we were given our tentative teaching programs, and I was intrigued to see that I was assigned a Robotics class. Although I've played with Lego Mindstorms, I've never received any formal training in robotics. But I thought with a little support I could do this.

Through discussions with my Assistant Principal, and some outside help from a fellow who has helped set up similar programs in schools, we initially thought of using Mindstorm EV3. The weakness with the Lego is that students associate it with younger kids, and some of them tune out.

So, during the summer I wasn't too surprised to find that they had switched platforms to something called BoeBot sold by Parallax. I was sent a sample curriculum, and some ideas for working with the kits, and I began doing research, but also confirming that I would receive training.

The next day I was told that they had switched platforms again. This time it would be something called Vex with a curriculum from Intellitek. Fine. I don't care. I don't know anything about any of them, so as long as I receive training I will do whatever they buy.

Today was the first day of school. They still haven't decided for sure just what platform I'm to base this Robotics class on. I am still not scheduled for training in anything. But to keep things really interesting, my class has been split. I have half of the students during 8th period, as my fifth teaching period of the day.

The other half, it appears, have been scheduled to meet with me 12th period. Twelfth! We don't even have a 12th period. I have no idea what time it would meet if I were to try to show up for it. I'm told that some of the 12th period students came to the classroom during 9th period, but I wasn't there. I only teach 1-8, and was taking care of paperwork during 9th period.

(I've also heard that administrators at my school have scheduled a meeting next week with some people to decide what platform I should be using in my class. Which started already. In case I didn't emphasize that already. That it's really late to be making these decisions. And why not just use that last one I heard about in the summer.)