Been A While

My summer has been pretty crazy with a big work conference that is finally over. My life is now my own again. Yay! I’ve been very behind in doing my monthly checking, but that’s ok. The good news is that I don’t have to go back to work for over a week. So I’m trying to do a bunch of projects around the house.

First up, I’ve never posted my video I made of the bookshelf that I made for a friend of mine’s birthday. It’s below.

That was a lot of fun to do and I want to do more woodworking. One thing though is that I broke my planer. It no longer will plane the really skinny pieces of lathe that I want to glue together. The thinnest I can plane a board is around 1″. I think this is because the belt broke and when I fixed it, I must have broken something else. I ended up buying a new planer. It’s a less expensive one, which is fine. I’m really just using it to clean up old, dirty wood. I have yet to set it up, so that will probably be one of my projects this week.

It’s harvest time in my garden. I’ve already gotten boatloads of tomatoes. I’ve given a bunch to my brother and just took a bag full to my Mom today. So I need to research how to make tomato sauce that I can freeze because there’s no way I could eat all of these before they go bad. Since the garden worked so well this year, I’ll probably make another little area next year. Think I’d like to try to grow lettuce and spinach.

If I’m going to make xmas gifts for people this year, I need to start. And while I like the idea of making bookshelves for people, I don’t want to give people a big piece of furniture. That seems a bit much. Anyway, I’m back to working with paper again. I’ve found some great youtube videos of how to make different types of books and bindings. That looks like fun, so I’ll see if I can come up with something cool.

Though, I would still like to make some stuff out of wood because I finally got my brand. I did have a little bit of time to do something fun last month and I designed a brand for myself. I then sent it to Shapeways to get made in stainless steel. It just arrived the other day. I’m quite happy with it.

brand

Now I need to put a handle on it so I can heat it up and put my brand on things. I bought a threaded rod and a tap and die set today. Hopefully, I can drill a hole and put threads in it. Another project for this week. But once that’s done, I should be able to brand just about anything.

Maybe Unstuck

A few days ago I ordered the book, “The Art of Electronics”. Today, it arrived. I’ve heard that it’s a great book for learning practical electronics. I’ve been meaning to do some serious study of electronics for a while. With my job, I should know more than I actually do. So, I think I finally have my plan. I’m going to try to work my way through the book. Nothing drastic and I have no real time table. But I’m going to try to study like an hour a day. And to limit distractions, I think I’ll work in the library at work. I’m thinking this is also how I got started in learning Rails programming. I want to say it took me a few years before I could do anything usable. I’ll have to check my old notebooks for the exact dates. But there’s no deadline or anything that I need to hit. So I can take my time. And when I get a decent feel for things, hopefully, I’ll be able to make the game that’s been floating around in my head for a while. And once I start working on this, it will hopefully kick me in the butt to get moving on the rest of the stuff in my kitchen. Tomorrow I’m going to see a ballet. So perhaps I’ll start at the library on Friday. Or I’ll just wait until next week and start off on Monday.

Arduino and Processing

I’m getting started with collecting data using an Arduino board, but displaying it using Processing. Eventually, I want do collect the data from a Raspberry PI board, but I’m starting with an Arduino because I think it will be easier.

The first step is to hook up a temperature probe to the Arduino and start collecting data. I’m using a MAX31855 breakout board from Adafruit. I hooked it up as suggested in the tutorials:

MAX31855 DO to Arduino digital 3
MAX31855 CS to Arduino digital 4
MAX31855 CLK to Arduino digital 5

And then ran wires for ground and 3V.

Next I needed to download the Adafruit MAX31855 library. I unzipped the file and put it in my ~/Arduino/libraries directory. One thing I needed to do was rename their directory. It had underscores in it, which the Arduino IDE complained about. So I renamed the directory AdafruitMAX31855 and it worked fine.

Here is the code I loaded on the Arduino, which I basically copied from the Adafruit website, but took out all the comments to make it shorter.

#include "Adafruit_MAX31855.h"

int thermoDO = 3;
int thermoCS = 4;
int thermoCLK = 5;

Adafruit_MAX31855 thermocouple(thermoCLK, thermoCS, thermoDO);
  
void setup() {
  Serial.begin(9600);  
  delay(500);  // wait for MAX chip to stabilize
}

void loop() {
   Serial.println(thermocouple.readFarenheit());
   delay(1000);
}

After I loaded this, I could open up the serial port monitor and watch the temperatures get printed. So that was done. Now on to Processing. Eventually, I’d like to generate a graph of the data. But first, I just want to see if I can simply read the data from the serial port and print it out in the Processing console.

Here is the code for Processing:

import processing.serial.*;

Serial thePort;
String theString = null;
char endChar = '\n';

void setup()
{
  thePort = new Serial(this, Serial.list()[2], 9600);
  theString = thePort.readStringUntil(endChar);
  println(Serial.list());  // only need this to get the list of ports so you know which one to use
}

void draw()
{
  // everything happens in the serialEvent()  
}

void serialEvent(Serial thePort)
{
  theString = thePort.readStringUntil(endChar);
  if (theString != null)
  {
    theString = trim(theString);
    println(theString);
  }
}

A few interesting things to note. You have to find out which port you’re using. On my mac, in the Arduino IDE, I have choices like this:

Screen Shot 2014-06-25 at 12.33.31 PM

In Processing, this command will give a list of all the available ports.

println(Serial.list());

The output of that command will look like this:

/dev/cu.Bluetooth-Incoming-Port /dev/cu.Bluetooth-Modem /dev/cu.usbmodem1411 /dev/tty.Bluetooth-Incoming-Port /dev/tty.Bluetooth-Modem /dev/tty.usbmodem1411

I know from the Arduino IDE that I used /dev/cu.usbmodem1411 as the port. In the above array, that port is at position 2. So to open a connection to that port in Processing, I should use the command:

thePort = new Serial(this, Serial.list()[2], 9600);

This all works ok. I’m not that familiar with Processing, so I need to read up on it a bit more so I fully understand everything I did. And then the next step will be to move on to creating a graph.