Archive for March, 2014

h1

Almost feature complete

March 31, 2014

My little are-you-ok widget tweets when it has been tapped or moved. It also tweets if it hasn’t been moved in 10 minutes. (You probably don’t want to follow @ayok_status, the timeouts change when I’m testing; that little guy can tweet a lot.)

But that’s the main functionality: tweeting when it doesn’t move. Setting 10 minute or 24 hours is just a parameter. I’m done!

Well, not exactly. Like many software projects, even though the main features are in place, 75% of the work remains to be done.

I need to do the battery stuff, putting the electric imp to sleep but waking up to monitor the current battery status with the fuel gauge. I also need to tweet when the batteries are low, probably have the device check-in every hour (or four) to verify it is still alive, even if it hasn’t gotten any attention. I can add battery level to that. Also, I need to check how much power the unit is using in different states (and make sure the accel goes to sleep too!) to verify my battery will last a long time.

And then I need to make a webpage to set all the parameters.

– How often do you need proof of life? Every 12, 24, or 48 hours? My 10 minute version is only for testing, I’ll probably switch it to 12 hours for the days I don’t spend at my computer.

– What do you want it to say when it doesn’t get anything? Do you want a tweet @ you? Or a DM (I don’t know how to do that programmatically but I’m pretty sure it is possible.)

– Twitter is easy but do you prefer email, twitter, or text? (Text is the hardest, I know Twilio offers this but I haven’t dug into it. I suspect email isn’t tough, the most difficult part will be deciding if it comes from embedded.fm or logicalelegance.com.)

– Is there more than one person who should get a notification? Do they each want to configure their info separately?

– For email and tweets, what should it say? I currently have several strings it randomly chooses from and then tweets. Will users want to be able to enter their own? How many?

local stringOptions = [
     "No one has played with me since ",
     "I need to be pet but haven't been since ",
     "The last time someone filled my cuddle tank was ",
     "It's been eons since my last hug: ",
     "I'm so lonely, no one has paid attention to me for so long: ",
     "I'm hungry, hungry for hugs! Last feeing was "
 ];
 
 local d = date(lastCheckInTime, 'u'); // UTC time
 local day = ["Sun", "Mon", "Tues", "Wed", "Thurs", "Fri", "Sat"];
 local datestr = format(" %02d:%02d:%02d", d.hour, d.min, d.sec) 
 local choice = math.rand() % stringOptions.len();
 twitter.update_status(stringOptions[choice] + day[d.wday] + datestr);

– Should there be a method (button on the webpage?) to show when the device last checked in and its battery level? Should it also show when it last interacted with its user or should that be private?

What other parameters should the user be able to configure? I’m not that good with web pages so having a definite plan would be good.

And then, there is the testing: needing to let time pass, waiting for things to happen. I suppose that means it is time for another cup of coffee. In the meantime, I can dream of shipping it.

Right “shipping it” is a can of worms unto itself. Well, worry about these things first. And then maybe how to make it nice looking. And then shipping it.

 

h1

Motion sensing tweeter

March 29, 2014

Yesterday, much like yesterday’s post here, was an example of scatterbrainedness.

Today, I made actual progress on the ayok widget. It now sends a tweet when it gets motion (tap or movement) and it lights the LED based on current orientation. The motion detection comes in via the Electric Imp’s wakeup pin so it could be spending almost all of its time asleep, preserving battery.

It still tweets when you have motion. I need to update the agent to tweet when no motion has occurred for a period of time. Of course, for testing, that period of time should be relatively small. I also need to hook up the fuel gauge to monitor the battery, tweet when it is low.

I’ll eventually need to make a webpage to enter caregiver information: their twitter handle (or email or text phone number), the frequency required for proof of life (10 minutes – 48 hours), a clear/snooze option (mom’s on a cruise for 10 days, leave me alone).

This little bugler alarm is kind of amusing. I’ll work on keeping it asleep next, I think. Or maybe the battery monitoring. Either way, that’s going to wait for a bit while I get on with my regularly scheduled Saturday.

 

h1

Step 1: Make a list of steps toward the goal

March 28, 2014

I was at a small start up, complaining that they were building a science project instead of a product. They seemed a bit confused by the difference. I made a list of milestones with concrete demos to show what I meant by obvious and measurable progress. The first few focused on the single working unit they had, but starting to prove software control of hardware (electrical and mechanical). The next few focused on making sure multiple of the expensive-ish units could be built; there was some subtext about making software tools to verify different units behavior. In the product world, that was about identifying manufacturing steps. The final few milestones were more directed toward some of the software algorithms and toward larger scale manufacturing.

Darth modified for demo

Sadly, after we defined and met the first demo, the other engineers realized just how (not) far we were along the path. The start up has closed its doors, trying to regroup. I feel sad about this, I know I instigated the crisis. But it was coming anyway so I don’t feel totally awful for speeding its arrival.

As I’m working on the are-you-ok widget, I’m struck by how often I want to have milestones, something that acts as a demo, that shows progress.  Since this is a personal project and it would be more short-term fun to read a novel, I try to keep myself engaged by having interesting deliverables.

Yesterday, I got the accelerometer working so that the LED color depended on orientation (RGB  set via XYZ). It was fairly amusing, though hard to demo without a video.

Green is Y

Red is X
Blue is Z

For today? Well, I think I want the device to wake up when it is moved, read the accel, tweet that it moved, turn on the color based on accel, ramp down over a second if no additional motion, and go to sleep.

I also want to try out the new couch. And solder the motor boards (they came! finally!). And verify the old couch’s new location is as nice as I thought. Have lunch with Rob. Go out to dinner with my hubby to celebrate our wedding anniversary. Find my to-do list and cross something off of it (none of these things are on it since I lost it). Buy bread and benedryl. Practice my EELive IoT talk. Maybe even practice the teardown with Jen. Buy new jeans as these have a hole. Oh, shower, that I should probably do before lunch. And exercise. Fold the laundry.

Where was I going? I have no clue. But I should probably get started soon.

h1

Headline: Treasure maps making finding treasure 1000x easier

March 27, 2014

I was trying to work with a few other people on the ayok project so I made a map, so they could build their devices. Then they got busy and I got busy and not much happened on our stuffed animal monitoring device.

The good part of making documentation is using it myself, feeling so pleased with old-me and her amazing foresight in writing things down.

Having opted not to cave to easy money, I’m sticking to my plan of working on personal projects until after the embedded systems conference. And since my boards aren’t back yet, I can’t solder the motor boards.

Which is good because I want to build the ayok a little more. First step is actually building and thanks to that document, the hard part was finding the accelerometer I gave to my husband.

Map of how to build the are-you-ok electronics

I built this up (using a solderless breadboard, well, I didn’t put on the battery-monitoring fuel gauge yet, I need to solder a header on so it can connect).

It didn’t work. Electric Imp’s APIs have changed. That’s worrisome but I after some futzing around, trying to figure things out from their examples (their docs are better but still leave many things to be desired), I managed to get the thinking-of-you functionality working again, including the web page.

Connect ayok hw

What’s next? I think I’m going to make LED color depends on orientation angle (so red is x, green is y, and blue is z acceleration). That doesn’t properly use the Imp’s internet connection but I need to make the accelerometer work and that will be a pretty demo.

The whole text-me thing makes me nervous. I should see if Electric Imp has examples for that, I know they’ve been ordering pizza from the internet. I bet I can twitter to myself if the widget doesn’t get any motion. That will probably be an intermediate step.

Oh! Also, having had lunch with ayok idea generator Elizabeth, we agreed that the non-stuffed animal version should be a magnet on the fridge. If you open the fridge, proof of life for the day has been established.  (She mentioned toilet roll module as well but I’m not going to potty humor, despite the temptation.)

h1

Nerves of mercury

March 24, 2014

One of the most difficult things about being a contractor is not having a job. I recently finished a contract, it was only five months but there was a high learning curve and a ton of drama. I got a bit burnt out. Oh, and it didn’t pay well (mmm… stock, the monopoly money of Silicon Valley).

After it ended, I gave myself two weeks of downtime, plus one week of being at a conference. I’d spend those two weeks catching up on personal projects, preparing for my conference talks, and generally unwinding. At the conference, I’ll probably meet a few people, one will lead to a contract.

My first day of being off, a friend I haven’t spoken to in a year, maybe two, emailed to ask if I was still contracting and had any availability. We scheduled a meeting to chat, but by the time the meeting happened, it looked like the company was going to try to fix their bugs in hardware. Whew!

I managed to write my conference presentation, release boards, do a little maintenance work for a lingering client, get tax info prepped for the accountant meeting, work on the podcast, and buy a new sofa. Then a friend landed in the hospital so I visited, she was discharged (yay!), and I offered to look in on her while she’s at home alone (even work from her place since I can). I also sent out email to lots of work-friends letting them know about the conference (and my plan to search for a contract in a week or two).

On the first day of my second week off, a recent client asked for help right now. But I have to work on my conference prep. And I finally crossed enough chores off my to-do list that I can do some fun things. Plus, I have to finish the maintenance work for the other company; it’s probably only a few hours but it needs finishing.

On the other hand, what they want isn’t very hard for me. And they pay well, usually even on time. The project they want is somewhat interesting but not amazing new stuff. Worse, it is the sort of thing that is difficult to tell when it is completed (it is analysis, not code). I know I should say no but it is very difficult to turn down to paying work.

When I was full time, I never wanted to take another job while I was on vacation. The idea is ridiculous. Of course, with full time work, I knew where I was going back to, it wasn’t nebulous and uncertain.

I should end with words about staying strong, being happy to take the time to find a good fit, not taking the first thing available, being patient, noting that it has worked out ok in the past.  Bah humbug.

I’m not taking the job because I don’t want the short term pressure associated with it. That’s enough. For now.