## Pythagorean Theorem

People say math isn’t useful.

## Microwave Efficiency Tips

Ever think about how to save time when using your microwave? I do.

Instead of pressing 1-3-0 for a minute and a half, press 9-0 for 90 seconds. This saves a button press for anything between 60 and 100 seconds. Need 1:15? Press 7-5 instead of 1-1-5.

My microwave has a button labeled “Minute Plus,” which I always use when I need one minute instead of programming 1-0-0 or 6-0. If I need 2 minutes I hit that button twice. This button also saves from having to hit the Start button.

Do you have any tricks?

## How I Convert Kilograms to Pounds

At our gym a couple sets of weights on the lifting platforms are in kilograms, which can be confusing in America. It doesn’t have to be confusing though; the math is actually quite simple.

In order to make the conversion you need to know that 1 kg is roughly 2.2 pounds. If you go out a few more decimal places it’s actually 2.20462, but that extra only ever makes a difference of a pound unless you’re setting world record deadlifts, so you can pretty much throw it out and call it close enough.

So…

1 kg = 2.2 pounds
10 kg = 22 pounds
100 kg = 220 pounds

You shouldn’t even need to think about those, but rarely do our weightlifting numbers fall on powers of ten. What about 53 or 97 kilos?

First double the number.

53 x 2 = 106

Then take care of the 0.2 part. Multiplying by 2 is already done, so take 106 and move the decimal place over.

10.6

Round up to 11.

106 + 11 = 117

Easy! How close does that come out? 53 x 2.20462 = 116.84486. Spot on. How about 97?

97 x 2 = 194

19.4

194 + 19 = 213

Here’s one where the extra 0.005 would have made a difference because 97 x 2.20462 = 213.84814 or 214 when rounded up. Close enough though. 😉

## Rubik’s Cubes

I think we had a cube at some point as kids, but I never put any time into learning how to solve one. I recently watched a video (and part 2) from my YouTube subscriptions which pushed me to order this set of speed cubes for \$10.99 on Amazon. I also learned of the existence of different sizes from that video. Figured they go well with my fidget cube and fidget spinners too. These speed cubes are different from the old school cubes we had growing up, because you can start to rotate a different area before completing a full rotation elsewhere. I used a step by step guide from You can do the Rubik’s Cube to learn the 2×2 and a series of videos from Think Maths for the 3×3.

## Building a Better Interface for the Airdyne AD2 with a Raspberry Pi (Part 4)

In part 3, I explained the troubles I had reading microphone input through a USB adapter and how I eventually made progress by using a package to “listen” for sound.

## Part 4: Calculations & Sample Data

Since the Airdyne sends a sound with each revolution of the flywheel, the RPMs were easy. I did some averaging over a number of revolutions to get a stable number. I had found formulas in a spreadsheet shared on the Airdyne Erg Trending post, so it was easy to plug in the formulas for calories and watts (even though my model doesn’t display watts). Distance and speed go off one another, so I jumped on the bike to collect some data.

When the machine stops/pauses, it continues to cycle through the 5 pieces of information and keeps the last number there. So I pedaled for 10 seconds or so, stopped, waited, and then recorded the speed (distance would be too inaccurate in such a short period of time) and rpms. Reset the display and repeat going faster each time. Threw the numbers in a spreadsheet, got a ratio, did some averaging, and worked both ways backwards with the average.

Looking back, I think I went a little overboard with getting so many samples. Miles per hour came out to be the RPMs divided by 3 ⅓. With a formula for every piece of info, my program output to the command line so I could see it in action. I jumped on the Airdyne, and used the audio cable splitter so I would get output on both displays. The RPM, distance, and speed were fairly accurate right away, but the calories were not even close.

I looked over the formulas to make sure I didn’t make a mistake, but didn’t see anything. I went back to the blog post and finally realized I had a different Airdyne model. I don’t know how I overlooked that when he was mentioning watts, which mine doesn’t show, and he has a big picture of the display right in the post. Anyone who has used several different models of the Airdyne can tell you that calories are much easier or harder to rack up from model to model.

In his post, Preston mentioning using an Excel chart, to get a formula from a trendline. I had no idea what this magic was. I don’t have Excel, so I searched to see if Google Spreadsheets could do the same thing. I found something even better, Google Charts does it, so I could write copy/paste code. 😉

Now I needed sample calorie data that I could plot on a chart. I was back out to the garage and hopped on the Airdyne. This was tricky. Since my goal was to find out what different average RPMs for 1 second would equate to in calories, I tried to maintain a constant speed for 36 seconds. Had to do 36 because it takes 30 seconds to cycle through the display and another 6 to get back to calories. I adjusted my program to keep track of the RPMs and calculate an average over the 36 seconds. I recorded both numbers in a spreadsheet and repeated the process over many times, with increasing speeds.

After getting a calorie per second average I plotted the points on the chart and voila! I got a trendline and a formula. The calories were looking much better. Still not awesome, but I figured it could be due to how I was averaging out RPMs, how I was rounding, or how often I was calculating everything. I started building a graphical display because I was getting tired of looking at command line output. At some point I got in a 10 minute “workout” and recorded a sound file on my computer and kept track of the calories so that I could pipe that back through my app for testing. I wish I had written some kind of simulator to eat through the data and spit out numbers.

I kept going back to the formula though. It was bugging me. What was I doing wrong? Finally it dawned on me how to get perfect data out of the Airdyne. Feed it perfect data and take the human element out of it. I could use a metronome since all the computer cared about was hearing something! Back out to the garage. I already had MetroTimer on my iPhone, so I plugged it into the Airdyne computer and recorded new calorie data at different speeds. I had new chart points and a much better formula. Still not accurate enough, but at least I was confident it wasn’t a problem with my data.

In the next post, I’ll give you a look at version 1 of the app.