Category Archives: Uncategorized

todo list 9/9/14

hello there friends!

just a casual post here. this is on my todo list:

blog

  • finish virginia backpacking trip post
  • finish fairhaven -> boston bluewater sailing post
  • thoughts on kickstarter and startups

accelerators

  • r/ga
  • YC
    • find alums who have done YC
    • make statistical gif cakes
    • finish application
  • tech stars
  • lemnos labs
  • bolt

reading

  • DFM
  • that long post -about casting
  • e4c discussions
  • education terminology
  • friends’ blogs!

learn!

  • spanish
  • sailing
  • D3
  • javascript visualizations
  • ML things
  • database architecture
  • android
  • ruby on rails
  • CTF stuff
  • openCV
  • get better at git

classes to finish

  • 6.004, 6.302, 6.003, 6.033, 6.046, 6.006, 6.034
  • http://web.mit.edu/catalog/degre.engin.ch6.html
  • quadcopter class
  • 18.06
  • some statistics class or other

buy

  • ukulele book
  • outboard motor

make

  • android / openCV resistor value recognition
  • resume (update), portfolio website (organize blog)
  • flash laptop bios

startup

  • accounting/taxes
  • payroll
  • app inventor ble block
  • 6.01 robot cost reduction / robustness
  • gatttool 5 unit block

26 foot 1967 Boat: Massive Update pt1

20140604_165449

A few months ago Cappie (co-founder of NarwhalEdu) and I bought a boat off  craigslist for a very small amount of money and have since been working on attaching pieces and getting her shipshape again.

We actually could have gotten her in the water much sooner if it weren’t for several mishaps with the registration and titling office until finally we got on the phone with the right person.

Here’s a summary of our trials and tribulations with the boat. I’ve been keeping it under wraps (har har… it has actually been under a tarp for weeks now), but over the last few months have gently broken the news to my parents that I will be living on this boat. So now I’m free to blog about it!

First Impressions

IMG_0673

Cappie found the boat on craiglist in February while looking for a dinghy. It was listed for $500. Wow! What was up with that — a 26 foot boat for that much? Was it falling into pieces? After some conversations back and forth that went roughly like this:

Cappie: So, how do you feel about twenty-six foot boat.

Nancy: Lol wat? …seems lulzy.

Nancy: …wait, are we actually serious about this?

Cappie: I dunno.

Nancy: … … I dunno either. Lol! Boat!

Cappie: Boat!

we decided to investigate right away. We weren’t sure why someone would sell it for this price. Cappie theorized that maybe some older guy just wanted the boat to be in good hands with some youngsters. I was very skeptical of this, but it turned out to be the case!

We got some input from our friends who said things like:

“Boat stands for Bring Out Another Thousand” and “The happiest days of a boat owner’s life are the day she buys the boat and the day she sells it.” One person said simply “Don’t do it” and refused to talk to us further. Well. One thing everyone agreed on was that the woodwork inside was beautiful. The owner at the time was a carpenter and had spent many years working on this boat.

After some consideration we decided to go for it. The money would only be $100 up-front and we could at any stage decide to abandon the project.

Initial Work

  1. Lightly sanded the whole keel while wearing respirators. Lead paint yay! Orbital sanders were used
  2. Lightly sanded the deck down to prepare for a new deck paint job. Sandpaper was used
  3. Removed a lot of junk from inside the boat and vacuumed the whole place.
  4. Scrubbed mildew off the roof and other places

On the bureaucracy side, mostly we just got really angry and frustrated because it sounded like they wanted us to pay 20 years of excise taxes on a boat that was never used. As recent college graduates working on startup, a few hundred dollars is a significant chunk of change.

Trailering

At that point, we needed to move the boat out of the Worcester warehouse it was stored in since the warehouse was scheduled to be torn down.

We asked around and finally learned that marinas in Boston all wanted insurance, which we couldn’t get without a hull ID number, which we didn’t have because our boat was so old. However, we found a marina that was kind enough to put us up. We found them through a trailering service they advertised on their website. Turns out, they drove all the way down only to learn that their trailer was too big to fit inside the warehouse between the warehouse pillars!

20140530_155343

Sad. But they were able to recommend to us someone else who had a smaller trailer.  And man, seeing the hydraulic lifters in action was pretty sweet (the big trailer even had wireless controls for one), as well as just how awesome the drivers were at driving geometry and precise maneuvers, and seeing the drivers confidently pull out the stands and “jenga” out the blocks was impressive.

IMG_20140604_133856

Well, $500 later (and a bunch of effort securing the mast down and bringing it on top of the boat) the boat was in Fairhaven. We wrapped it up in a tarp and left it there.

A few weeks later, we return to find a flood inside… we hadn’t noticed because after it rained it would dry out and drip out over a few days. The beautiful woodwork warped even. We puzzled over what was going on and where the water was coming from for a while, before realizing that there were several holes we didn’t tape over in the bow and also

20140718_130146

there was a valve that we hadn’t opened to let all the rainwater coming in through the deck drains out. DERP. It actually poured out water for several minutes like that and formed a small lake.

Next update: Janky watt-hour testers for boat batteries, honeycomb nest discovery, HIN dremeling, EPO inspection and detective work (what is the boat actually?), registration and titling issues, troubleshooting an old outboard motor, and attaching the gunnels and trim, costs of living in a marina (liveaboard) vs paying rent.

Python -> Adafruit nrf8001 bluetooth low energy breakout in 20 minutes (Ubuntu 14.04)

As part of my work on Swarmbuddies (robots that dance to music and create formations)

we decided to use bluetooth low energy for smartphone support, but also needed it to work on the desktop side for our computer vision software to work.
Here are the steps we needed to take to get it working.

1) Install Ubuntu 14.04

This is the easiest path. Really recommended, since bluez-5.20 wants some new version of dbus which can be installed on 12.04, but which will crash your computer incredibly hard when you reboot.

2) Install the latest version of bluez, bluez v 5.20 (or check http://www.kernel.org/pub/linux/bluetooth/ for the latest version), and uninstall your current version. Major help from jaredwolff.com/blog/get-started-with-bluetooth-low-energy for this step!

sudo apt-get remove bluez
sudo apt-get remove bluez-cups
sudo apt-get remove bluez-hcidump
wget http://www.kernel.org/pub/linux/bluetooth/bluez-5.20.tar.xz
 tar -xvf bluez-5.20.tar.xz
 cd bluez-5.20/
 sudo apt-get install libudev-dev libical-dev libreadline-dev libdbus-1-dev
 ./configure --enable-library --disable-systemd
 make
 make check
 sudo make install
 sudo cp attrib/gatttool /usr/bin/

3) On the hardware side, your arduino should be hooked up and programmed as per Adafruit’s tutorial.

Let’s test your connection. Plugin your CSR 4.0 dongle ($6 on ebay) if your laptop doesn’t support bluetooth 4.0 (or even if it does, we’ve found the dongle to be more reliable):

sudo hcitool lescan

If this succeeds you should see a bunch of scrolling information, including the MAC address of the nrf8001 breakout, which should be something like “EF:FC:D3:56:41:B7”. If it says file descriptor not found or otherwise exits immediately, use

$ dmesg | tail

to check that your dongle is being recognized by your computer.

4) Open Arduino and the serial monitor. Now try writing wirelessly to the Arduino with gatttool

$ sudo gatttool -b EF:FC:D3:56:41:B7 -I -t random
> connect

The white characters should turn blue. Now try writing to the UART service:

char-write-cmd 0xb FF00FF

5) You should see “3 bytes received” and your command on the Arduino.

6) Now to script it!

a) We need to change the Arduino code to do what we want. Here is an example of how to take the . A small explanation: If you don’t cast it to byte, the buffer is an array of characters which go to 128 instead of 255. I haven’t figured out how to check if it’s from the desktop or the smartphone, so once you cast to byte you lose compatibility with the default nRF UART application on Android and your Arduino will only process computer commands correctly.

https://gist.github.com/nouyang/2a6a733d8facd23115a4

Insert the arduino.ino code there or similar code into your Arduino IDE and upload it.

b) Create a folder and download the files at  https://gist.github.com/nouyang/2a6a733d8facd23115a4 somewhere. Modify NUMBOTS in constants.py to the number of breakouts you want to connect to.

If you’re looking at the btle-server.py code, please note that reading the pipe and setting the pexpect delay to 0 are critical for your bluetooth connection to not lag or take a while between commands.

self.con = pexpect.spawn('gatttool -b ' + self.ble_adr + ' -I -t random')
self.con.delaybeforesend = 0 #THIS LINE IS SUPER IMPORTANT
self.con.read_nonblocking(2048,0) #flush the read pipe!! SUPER IMPORTANT

c) Look at the processing or else the python code.  Modify it to your use.

Usage

Tab 1

$ sudo python btle-server.py

(hit “y” if your dongle doesn’t show up the first time, I only wait a second so sometimes the dongle doesn’t catch your device. If you try a few times and it doesn’t work, check sudo hcitool lescan to make sure your device is advertising. Try hitting reset on it.)

Tab 2

$ python python-client.py

Tada! That’s it! Here it is working on the computer:

I had to simplify the code a lot from our current structure, so let me know if it makes sense or doesn’t run.

For more information about how I figured all of this stuff out, see:

https://forums.adafruit.com/viewtopic.php?f=19&t=56332&sid=1423cb2d05389f479c2d5dd164d14e35

http://stackoverflow.com/questions/24564587/communicate-between-a-processing-sketch-and-a-python-program/24565160?noredirect=1#comment38049611_24565160

Like this tutorial? Want to take a class on programming your very own swarm of robots or have future tutorials like it? Back us on kickstarter!