Friday, July 9, 2010

fibonacci blinker

arduino code:

blinks the led on pin 13 in the fibonacci sequence - at least until it hits the max value of a long, and then rolls over.



int ledPin = 13; // LED connected to digital pin 13
long seq1 = 1; // Sequence number 1
long seq2 = 2; // Sequence number 2
long seq3 = 3; // Sequence number 3
// The setup() method runs once, when the sketch starts

void setup() {
// initialize the digital pin as an output:
pinMode(ledPin, OUTPUT);
}

// the loop() method runs over and over again,
// as long as the Arduino has power

void loop()
{
for (int numberOftimes = seq1; numberOftimes >=1; numberOftimes--){
digitalWrite(ledPin, HIGH); // set the LED on
delay(1000); // wait for a second
digitalWrite(ledPin, LOW); // set the LED off
delay(1000); // wait for a second
}
delay(5000); // wait 5 seconds between series of blinks
seq1=seq2; //shift the second number into the first variable
seq2=seq3; //shift the third number into the second variable
seq3=seq1+seq2; // calculate the third number (based on previous two)

}

dev

As it is, so it goes.

Once again a large gap between putting down anything as a record - (in the spirit of things) Hello, World! Those of you who've taken a programming class or two, that's for you.



Last post was about being in Germany - a good experience but a long one. The beer was good, but not a lot of variety (more at the grocery store than any bars). I'm glad it's over but I'd go again. This post is about doing, rather than talking (or thinking).

For awhile I've been interested in arduino micro-controllers. Mainly from reading the RSS feed of Make Magazine. They have lots of projects that seem interesting, and close to hobbies I'd actually like to have - rather than read about. I've taken old t shirts and made a blanket out of them. I made an interesting collage out of all of my old CD booklets and cover art. I like to paint, used to make models (and have some lying around, ready to be assembled). Use to play with legos (and have a plan for a fish tank with legos inside). So i enjoy making an item of "stuff" out of a larger quantity of "stuff" i have around/collected. It's also a way of reducing the collection. (I have plans for a large quantity of bottle caps, and a drawer of a beginning collecting of altoid tins )

Anyway, I started by purchasing an arduino board from sparkfun. Plugged it into my computer, and quickly ran through the two blink examples. I quickly ran through the two blink examples (and while writing, decided i should do a fibonacci sequence blinker, but anyway) and realized i needed some components if this was going to become a true "hobby". Work put me through a professional soldering class (rework and repair certified) so I feel pretty confident.

Picked up some more bits last night (including a soldering iron that won't set the apartment on fire - a true concern).

If I think to, I'll write more later.

Tuesday, October 27, 2009

deutschland is spelled germany

Deutchland is - many things.

I'm currently in my "room" - I've been up since 3am, because that's when I got up to go to work.

My room is tiny. I turn slightly sideways when I need to sit sideways at the bathroom.

There are prostitutes living in the apartment next to my hotel. And their bar - I can see from my window. (Going rate is 40 euro, negotiable to 20 euro - or so the story the story filters back - from a native german, not from the area)

I have a cold. It started due to there being an irish cover band downstairs. people stayed up until 4am smoking - i didn't sleep and inhaled smoke all night. ive had smoky dirty snot since and a sore throat. not sleeping probably didn't help either.

Castles are cool and to be seen.

Churches, basilicas, and cathedrals are cool and to be seen.

Working out is always worth it. but causes pain and soreness.

German food is rich/high calorie and you must be careful when eating it.

Milk here is to be avoided if you have any issues when drinking milk. Including the yogurt probiotic drinks. The cold cappuccino drinks can be flirted with, but should also be avoided when possible.

the hurt locker was a really good movie. i watched it on the flight over (and a second time during the flight). I'll probably watch it a third time on my way home, if they have it. Can't stop thinking about it. The line when he's at home with his wife and son (the wife is kate from lost) sums up the point of my movie. really really good.

belgium is awesome.

not much else to say. everytime i do what i'm doing now on travel - i lose time. i don't know what day it is, what time it is, what month it is. i don't know any of the news. i leave, time goes on, and then i return and everything is just a little bit different. a season almost entirely lost. i spend more time with my coworkers than my loved ones. the tiny flaws you can usually ignore in people, it's all i can see now. the alone time i usually get - i don't get here.

time to eat something. at 430pm. not exactly dinner time.

Monday, July 27, 2009

because i shamefully steal things

Books I've read this summer:


1. Atlas Shrugged - Ayn Rand
2. A Brief History of Time - Stephen Hawking
3. Harry Potter and the Sorcerers Stone - JK Rowling
4. Star Wars - Outcast - Aaron Allston
5. Harry Potter and the Chamber of Secrets - JK Rowling
6. Harry Potter and the Prisoner of Azkaban - JK Rowling

7. (Currently) Harry Potter and the Goblet of Fire - JK Rowling
8. (Currently) Beedle the Bard - JK Rowling

FUTURE
9. Star Wars - Omen - Christie Golden
10. Harry Potter and the Order of the Phoenix
11. Harry Potter and the Half Blood Prince
12. Harry Potter and the Deathly Hallows

So I'm re-reading some items... movie based on a book will do that to you.

Sunday, June 7, 2009

"Carla was the prom queen."

"The Rock" holds up. After having the Bacation! in California and really getting to see and wander around San Francisco - including touring Alcatraz, The Rock is still good.


There are obviously some liberties with the Alcatraz geography, but that's okay. It's a movie.

In other news, I'm still powering through Atlas Shrugged, and really enjoying it.

Monday, June 1, 2009

@#$$^%&*&^%^&*()(*&^%!!!!!

Honestly there will never be enough time in a day for me.

I have way too many unfulfilled ideas and activities that I would like to pursue; the limit of 24 hours, the need to sleep, and a full time job are burdens that are just too much to handle.

There are approximately 500 novels (approximated by an estimate that took a very short time to generate) that I would like to read.

I want to learn to the python programming language.

I wish to implement some sensors and an arduino board into a backing up/distance sensor on my car. Preferably attached under the bumper in a pelican case with a simple digital readout inside (no 'beeping' like in the expensive cars, but something that is like x meters)

I wish to fiddle with my pictures in GIMP (because i don't want to pay for photoshop, and i have issues with pirating software)

I want to go back to school and get a Ph.D. in at least one subject (and there are at least 4 that I would like to pursue).

Not something I want to do, but I cannot stand the bureaucracy associated with full time careers. It's not enough that I actually enjoy the work, and would actually look forward to going to it every day, but i seriously feel that it will inevitably lead to me being unable to ever be satisfied with it.

which leads me to - I'd probably be happier with a simpler job working with my hands, or something else. Like renting bicycles. This isn't ment to belittle these jobs/lifestyles/whateveryouwanttocallthemcareers - it's like a post modern (wtf does that even mean - when was modern? the future is now! [but it can't be if there is was will be, wait, don't, read on] where do my parenthesis end? here?) take on kant. The common man has it right (said in a way the common man can't understand - or so goes the joke).

CRÆP§!#

And I want to devote time to working out and relaxing (like in a yoga, meditation, thinking about nothing way).

And the following is slightly disgusting, so WARNING!
But I find lifting weights boring. And my blisters from San Francisco got blisters, so i cut those off, and so now there is like a third set of blisters (and then the one had dirt in it, so i had to clean that beast out) so walking is slightly painful, but still very enjoyable.

Also I want to play video games.

Saturday, May 16, 2009

belay that order!

i really enjoyed star trek (a bit delayed)