Saturday, September 13, 2014

Home Automation - The New Thing??

"Home Automation" - The latest buzz word of the world it appears. If you haven't heard much about it you likely will soon. With Apple jumping on the band wagon just maybe the general world population will begin to see and use the "smart home" technology that many of us have taken for granted for years.

Hearing about "cutting edge" home automation apps that text or email you when things like burglar alarms sound or doors open around you home when you're away sounds so cool... and they are, they just aren't so "cutting edge" to me. We've had such notifications for over 15 YEARS from our house. 

I'm not alone, Home Automation has been around for decades, it's just now maybe starting to go main stream. Heck I had my old VIC 20 computer turning lights on and off while we were away from home in the middle 1980's so not much is news to me. In fact our home has been online and accessible through the Internet since 1999.

Of course most of this is very DIY or very expensive to have someone else build it for you but the concepts have been there for a long time. The ability for your house to check if the garage door was left open late at night and close it for you, to let you know when the burglar or fire alarm goes off, to automatically turn certain lights on or off when a car pulls up or someone wanders around your yard are all things I've almost taken for granted anymore.


My solution is a hodgepodge mash up of various pieces and a lot of home written code but it does the job. Of course some of it is just for fun, I mean does one really need to know how many times the refrigerator or freezer opened each day or how many times the cat used the litter box? But it could be useful if the system could tell you that that freezer door appears to have been left open for 30 minutes couldn't it? Is it really necessary for my washing machine and dryer to Tweet their activities? Ok, I guess not, but hey it is fun making it do that. No telling, maybe there is another lonely washing machine out there just waiting to meet up with ours on Twitter. :-)

Seriously though, part of my issue with the current "Home Automation" trend is calling it the wrong thing. Such things like turning a light bulb on and off from anywhere with an App like the WeMo light or the Phillips Hue is cool but that's not automation, that's remote control. Of course those can be "automated" to some degree using IFTTT.com but that's not what the manufacturer is telling you. Oh well, the more hardware available the more options there are I guess. 

Having that Hue light bulb change colors when the garage door is open or the forecast says it's going to rain is a bit more automated. I haven't done that yet but know I how it would I would do it if I wanted to spend the bucks for a Hue. Turning off the lights and arming the alarms system when you leave the house is automation. Having the house tell you by speech that the garage door just opened, the dryer or washing machine just stopped, etc or text you when the doorbell rings is automation to me. Having the house know you're home or away based on where your phone is at, which is generally where YOU are at, is automation. 

Time will tell where the trend goes but at least it appears to gaining momentum and there are more and more DIY trends heading our way. Unfortunately many of them force you to sign up for some monthly service to use the features and I'm personally not in favor of that but likely many will be and maybe that is what it takes long term for Home Automation to make it to the masses. 


Saturday, September 6, 2014

Master of None?

"Jack of all trades, Master of None" - I'm sure everyone has heard that quote before, and usually with negative connotations. I was once told by a mentor to never be one, to specialize to the extreme to be successful. Being one to never take advice very well I obviously didn't follow it. I remember when I was told that, my first thought was "How boring"... And I still believe that.

I don't think I've mastered anything in my life. I may know some things better than many others but have not mastered them by far. I can rescue old cars and give them new life, make a fun to watch Lego stop motion movie or two.. Ok, I made a lot of them, can build a home automation system from scratch back in the 1990's before it was cool, can write dynamic web code and created a few web or cloud apps, built a working 3D printer, conceptualized and built a few entertaining robots, ok, a lot of them too... even a contest winning one. I can still free sketch with paper and pencil good enough to enjoy and remember and attempt to play guitar cords from a few different songs. I can weld good enough to repair the old 69 Mustang, design and build a go kart from scatch, and design and build a remote control lawn mower.  

I've heard many times it takes seven years of studying something to master it. I'm pretty sure that time line was way before the world was changing at the dramatic rate it does today. Can you really "master" anything today. In seven years pretty much anything you've "mastered" is not going to look, act or feel much like it did before. Even core trades like brick layers and roofers see changes in material, designs, and methods, and I'm betting big changes over seven years. I'm sure the saying still holds true if you want to be the "best of the best", but I've always wanted to "discover the rest" instead. 

Guess I'll wear my Master of None badge with a little pride and reflect on the many different areas I've learned about and enjoyed over the years, err decades. I think the key is "mastering" constant learning, and by the time you're dead and gone at least you'll have lived life experiencing and learning about at least some of the worlds great offerings.

Sunday, August 31, 2014

Time...


The end of August, the end of another summer gone in no time. Leaves beginning to fall, plans uncompleted, lawns not mowed enough, flower beds unattended, and projects still in the same status of spring. Each month seems to pass faster than the previous without warning and without slowing down. The "busy-ness" of the work week burns out the motivations of the evenings and weekends. Eat, work, recover, sleep, eat, work.... well, I guess there are more "eat" steps in there for me than there should be, but the routine is similar. I used to think that life would slow down as you age, you'd have time to appreciate it more and feel more accomplished. Not happening here at least. So much to do so little time to do it seems the standard. Time marches on, accomplishments do not. 

I do stop, however, and appreciate what I have, often. I can walk, I can work, I can play, and I do have more free time than many around the world. I have a job, I have a family, I have a house and the things that go with those the good Lord has given me. I have good health, as compared to many, which is the one of the most important of all. I actually can do things I want to do for the most part without assistance or other resources. I can even sit here wasting time writing and complaining that I don't have time to do things.... Oh, wait... I just need that time expansion tool but I don't have enough time to work on it! Oh the conundrums of life. :-)

Friday, August 15, 2014

Life Changes...

It's funny how changes in life seem to sneak up on you although you known it was coming for a long time....

The latest example is sending our wonderful son Austin off to college. Sure, we knew it was going to happen, knew he was going to move on to his new chapter of life and become the true adult he already was but still, it doesn't seem real until it actually occurs. We have been planning, saving, watching and listening to his plans and ideas and talking about this for some time now. Where was he going, what was he going to major in, where was he going to live and all the regular stuff. We listened more than advised and let him work out what he thought was best for the most part. Some ideas grew, others faded away, and a plan fell in place.

Sure, as a parent it's exciting to see your children turn into what you've been working, hoping and praying for the last 18 plus years or more. This is what you've wanted all along is an independent, kind, smart, generous human being that will be a positive part of this huge world. So it's done for the most part now... Sure we will be listening, advising and talking still, hopefully forever, but once they leave the safety of your home, their bedroom, it's amazing how bittersweet it can feel.

I was so sure I'd be fine with it, I'd be proud seeing him move on and take on the world.. and I am. But I'm also surprised how sad it really feels knowing this is a BIG change in OUR lives as well as his. To know he won't be home every night and I won't be waking up at 2AM to make sure the Home Automation told me the garage door opened after I went to sleep and Austin was indeed home safe and sound. Knowing he is pretty much on his own with 18,000+ other students at Oklahoma University that are creating their futures as well.

So now it's on to the college years, on to OU, on to meeting new people, making new friends and learning not just academics but how to be successful, happy and productive for the long haul.

I guess like anything it's hard letting go, but go he must hopefully always knowing he is welcome home anytime, can call, text or write and can fully expect us to be "checking in" with him more likely more often than he even desires.

Love you Austin and best wishes for your new world!
Dad

Wednesday, January 29, 2014

PuP - Pretty Useless Playtoy

PuP - Pretty Useless Playtoy

PuP is just a hack of an old toy that was getting thrown away. Honestly the factory function was likely as entertaining as he is now as it would bark, bark, and drive forward and backwards… but only over and over again. Now he can “see” what’s around him and respond in a couple different manners. Still only forward and backwards but he does move at least.
Original Plans / New Plans
Originally my thoughts were pretty grand for such a small little thing. I wanted a Pro-Mini, LiPo battery, sonar, sound, IR receiver, LDRs, a wagging tail, servo head, RGB mouth, a piece of metal on top of his head using touch sensing for petting, and more. BUT the reality of getting just the CPU and battery inside the small ½ section of the body stopped those plans. I had even thought about using a “leash” to power him to remove battery needs and make more room for CPU, etc but wasn’t sure how well that would have worked out.
I still really wanted PuP to move forward and backwards, talk, and have a sonar for eyes though. So after some success with an ATTiny85 on Buford and Buzz I figured that may work for PuP. So the plan was scaled back to ATTiny85, sonar, speaker, RGB LED, and home brew transistor H-Bridge.
PuP Build
Pup was decapitated, man that sounds harsh but that’s what happened, and a 9g servo replaced his head after some “plastic surgery”.  Once mounted up a couple face options came to mine but the easiest route was taken. Servo horn, 4 pin header mount, piece of metal across the top and some brown printer paper for ears worked for me. I found another small speaker, glued it up in between the sonar “eyes” and then thought about what to do for light output, tongue or something..

By now I was already running out of pins with the 5 pin limit for an ATTiny85. I already had 1) Forward drive, 2) Reverse drive, 3) Single Pin Sonar, 4) Speaker Output, and 5) Head servo… Actually I was already OUT of pins but I wanted PuP so have some light of some sort!

So the first thing I tried was paralleling the Red of the RGB with the speaker output. That works but you can barely see it as the output is pulsed and the speaker takes most of the current. Next I hooked the green and blue up across the forward and backwards output pins. Since the pins go HIGH to make him move and the RGB LED has a common POSITIVE lead, the Blue and Green stay ON while sitting still and go off depending on if PuP is moving forward or backwards. Works at least and gives a little light show.
Making It Fit
Getting it all to fit was still a challenge, even with the ATTiny85. I had to make sure I could get to the ATTiny85 to pull it to reprogram it the million or so times it takes me to get code right. Plus I had to fit the battery and the tiny Pololu 5v step up/down regulator in to make sure the sonar would run at 5v properly. It kind of worked, I really should have put the regulator on top of the battery and the ATTiny board in the rear but too late at that point. I had to do some more plastic surgery to get the top half to mount properly and now PuP has his “brain” sticking out of his back a little but hey, he’s just a PuP.
Fitting things on the head wasn’t quite as complicated. I needed to get signals power to the sonar, LED and speaker and signals back for each as well. I ended up tapping of the power and ground on the sonar and then added a couple more female headers for the speaker and LED. I actually have an extra wire running from head to body now but do not see anything to use it for.
Unique Walk
The unique thing about PuP is how he “walks”. There is only ONE motor deep inside his guts. It drives some gears that then drive the balls on his feet which are splayed out. As the balls turn together one direction, he moves forward, the other direction, in reverse. Looks nice and functions pretty good actually.

One thing I did NOT realize until he was completed was the right front leg not turning when he backs up is apparently a “feature” I was unaware of. I thought there was a problem or broken issues with him until I watched it a couple times in action. This allows PuP to move reasonably straight forward but to turn by backing up to the right. Like some real cheap RC cars you see that only have forward / reverse but turn when backing up.

This is something I really need to take advantage of when I further develop the code for him to allow him to roam around a bit more.

PuB - Pretty useless Brain
PuPs brain is pretty simply, but has room to grow if I want it to since it’s only about ½ full at this time. Right now he starts out just sitting there staring out to the world. If you get close enough he’ll lock onto you hand and try to follow you, if you move too close though he’ll back up, and if you get super close he starts to get worried, his voice goes up in pitch, and he turns his head away and continues to back up. Get even closer and he turns his head the other direction like “get away from me!”
The next step is to add some more modes to him such as roaming while looking around and just avoiding things. Trick here is there is no easy way to swap modes as I am out of input pins so I will likely use my old tick like on Chomper and others of getting in his face as a mode changing option.
Obviously some random features of just getting bored, looking around, making some sounds etc if not stimulated for awhile need to be added as well. Just makes it a bit more enjoyable to mess with.
Closing - Good Results from Bad Code
MaxHires and I were chatting in the shoutbox about “unintended good results of bad code”. Max said he has had that happen in the Apple coding days with graphics where code  errors can generate some awesome artistic results.
PuP has a very simple example of this in my opinion. I am using the SoftwareServo library in PuP. It works but is a little different in that it requires you to constantly call the SoftwareServo:Refresh routine to keep the servo moving and in place. Since I am not using a library to read the sonar on one pin, I have to go read sonar and wait a bit so the refresh doesn’t always happen as quickly as it needs to.
One result of this is that sometimes, if PuPs head is turned away 90 degrees, he doesn’t just snap it back to front and center when he’s done hiding, he kind of bumps it a couple times when the refresh hits. Which is actually more “natural” than speeding back to center. This results without any intentional coding on my part. Heck if I TRIED to do it, it would likely not work at all.
My TED robot has a similar effect in that in some instances he seems alarmed and jerks back when he sees something while walking. Reality is I’m not handling the object detection cleanly and am jumping to different servos positions but it still “works” well.
So go build, go code, and sometimes, leave the bugs in… may make it a bit more fun!
Stephen

Sunday, January 12, 2014

Sir RoBert the Robot

Having built TED the BiPed ( and NED, a 5 servo design I've never posted) and having watched the BoB revolution, and up until recently not having a 3D printer, I left the BoBs for others to build. Recently I decided to go ahead and print a BoB as the printer seemed to be working well with Jinx and other LMRians help. Once printed I was even considering giving it away to someone that wanted to build one. But then someone posted a link to a little bot (http://learn.adafruit.com/trinket-powered-rover) that had the STL files for a silly mustache that clips to an ultrasonic sensor.
Sir Robert Exposed

I looked at the empty BoB shell and thought I have to see what a ‘stache looks like on him. I made a quick print of the mustache and stuck it up there and actually LOL’d. Someone else in the SB said he needed a tophat so a quick search turned up one, a not so quick print yielded a nice little hat for the BoB and he looked quite official. K120189, the BoB GoD and creator thereof, donned him “Robert” so that must be his name.

 Just a note:
Unlike most of my bot posts, this one really isn’t very close to “done”. Still a bit of coding I want to do once the platform is stable. Also want to add some more sensors such as light and sound and play a bit more with making him entertaining. But with the core done figured I’d post him up. Will update as new things are added to him.

 
Sir RoBert Brains and Senses

With Sir RoBert destined to be built, I began planning the layout, functions, etc. My obvious choice of a BoB Brain was a ProMini clone which I still love working with and am getting quite familiar with. Add the under $5 US price tag for a 328 CPU and it’s hard to beat in my opinion. Sir RoBert is fitted out with a normal ultrasonic sensor but it’s a bit more of a challenge to implement other sensors on this platform.
The normal ultrasonic sensor is obvious and useful for object avoidance but getting anything else like light dependent resistors (LDRs) etc mounted somewhere is a challenge. Additionally I really like having an infrared (IR) input on my builds to allow switching the “robotmode” variable for different features like roam, light follow, attack, wag, RC, etc. BUT I also want the build to look as appealing as possible. For the IR sensor I kept sticking it on different places around the BoB head and nothing really looked right until I stuck it above the mustache like a nose. Perfect fit in my opinion and that is where it stuck.
Getting light sensing on a BoB is a little trickier. It’s also not overly useful under my standard code on a biped that is twisting around back and forth all the time creating odd lighting patterns, but I still wanted to have the left/right light sensor features. I picked up some Radio Shack 3mm Ambient Light Sensors http://www.radioshack.com/product/index.jsp?productId=22472186 and will put them in the outer LED mouth holes for some type of light sensing. He at least needs to know which side of his face is brighter / darker and can respond. The key for sensing while moving is to only sense when his head is flat / forward which can be accomplished by a variable that is updated through the walk cycles. It could also be done with an accelerometer / Gyro / IMU solution but seems overly complicated for my needs. I haven’t added the light sensors yet but will be doing so in the near future.

Plug and Play
Plug n Play BoB HeadI really never realized how small the BoB head is until trying to get things stuffed into the head instead of on the outside. I really wanted everything in his head but still wanted and needed to be able to get to his brain and “inside his head” when needed. After thinking about long wires to do it, I looked a bit closer and it seemed like a set of female/mail headers would make a “plug and play” BoB head. I used two 90 degree male header pins on the bottom glued to the tops of the hip servos and glued the matching female headers on the inside sides of the head. To help line things up when putting the head on the base I added a couple pins that line up with the screw holes on the sides of the head.
It is now pretty easy to pull the head off, add stuff, fix stuff, etc and put him back together without a rats nest… well, too much of a rats nest at least, of wires, confusing connections, etc. Not perfect but pretty handy so far.
Pin In/Outs
Connected to head
2
3  
4  Sonar In/Out (Using single pin mode)
5  Ch1 Input
6  Ch2 Input
Not Connected to Head headers
7  
8  Right Ankle
9  Right Hip
10  Left Hip
11  Left Ankle
12  Red LED
Connected to Head
13  Speaker
A0  IR Input
A1  (Future Left Eye/Light)
A3  (Future Right Eye/Light)
A4
Not Connected to Head
A4 Green LED
A5 Blue LED
A6
A7

 
Remote Robert

 
Thinking one evening (yeah, scary thing, I know) I thought it would be cool to be able to radio control Sir RoBert with an regular radio control car controller that I had laying around. Only a two channel so some challenges but seems it could be done. My original thought was purely a free form, Arduino in the middle, solution where RC wheel input leans left and right and throttle moves right leg / left legs in a walking pattern.  
This works pretty good to me allow the steering wheel to rock Sir RoBert left and right and the throttle to move his hips back and forth. Walking is a bit of a challenge to get it coordinated but with this free form way of controlling him he can get pretty crazy acting bouncing back and forth and shuffling his hips. Rocking for a formal old man.
That will work and is still a cool way to play with the bot making him move from foot to foot and shuffle or walk around. After Input from K120189 in the SB made enlightened me to the point that the radio control could also be used to trigger the “drivemode” settings I use. I.e. throttle back and he walks forward on the standard routine, reverse backs up, right turns right, combo walks and turns. So you can really just “drive” Robert around.. albeit not very fast.
Expanding on above, I have a “drivemode” variable in my code for most all my robots. That determines for each loop if the robot is just stopped, going forward, backwards, turning in place, turning gradually, etc. That way any input can subsume another for obstacle avoidance, etc. In the RC “robotmode” case, the loop simple reads the radio receiver input and sets the mode or drives the servos in a new mode for direct access. Simple but works for me.

Filling the Head

RoBert BaseSo with that wonderful plan in mind I built up the robot putting an old 75mhz RC receiver I had laying around in the very top of his head and then piled everything else in on top of that. Getting all the wiring lined out right is a challenge in such a small place but it all seemed to work out. The biggest challenge is getting power and ground runs to all the sensors, header, speaker, etc so I piggy backed the nose IR sensor off the Ultrasonic sensor which saved on connection pair. I then used the two channel connectors to the RC radio only running power in one and ground in the other removing an additional connection there.
I found a tiny charger jack and power supply from an old cell phone and worked it into the back of the head, dropped in a small SPDT switch to turn him on / put in charge mode, and messed with a single RGB LED for some type of light. He really needs a bunch of 3mm LEDs but I didn’t have them so the RGB setup has to do for now.
Inside RoBert's HeadAt first I thought it would be really cool to embed a USB/TTL adapter into RoBert to allow any USB connection for programming, etc. I filled up the square hole in the back with one, set it all up and then realized I needed a USB extender cable to hook him up to the computer. Next I found that every time I plugged RoBert into the computer I had to wait for the USB to be found, re-select it sometimes, etc to program. With my lousy programming skills and the 1,000 times it takes debug/fix/re-upload my code that wasn’t going to work. I resolved it by removing the USB adapter and just extending the standard +5v/Gnd/Xmt/Rcv pin headers on the ProMini. Much easier and I can keep the same serial port for programming nearly all my bots. I did have to add an external reset button since I do not use the auto-reset wiring scheme but easy to do.
With everything installed I loaded up my standard TED code, tweaked a few servo end limits and let him try to get around. Does ok actually but still needs some limit adjustments as he will fall over pretty easily. But working so next I thought I’d try free form radio control.
Sir RoBert BackRemote Gone Wrong
I added another “rcrawmode” robot mode and added the code to read the receiver controls thinking it would be pretty easy. Initially I was just powering him off the USB connection and the RC stuff worked fine. So I unplugged him, turned him on and selected RC mode with the IR remote… and he went into spasms… twisting and turning and going stupid silly. Hmm.. ok, what is going on. First I thought maybe a library was conflicting while I was reading pulse in but it worked while tethered? It finally dawned on me while looking into the head that the old 75mhz radio was mounted right next to the little Pololu 5v step up/down regulators that I use. I really figured that was it so I bypassed the regulator and powered things up from a different pack. No problems like that. Great, so my old timey radio isn’t going to work.
Next step, move to 2.4g setup. I already had an extra 2.4g receiver from my RC Truck racing days and a transmitter that could drive it so now I had to dig the old receiver from it’s mounting point underneath EVERYTHING else in the head. Only broke ONE wire doing it… surprised. Next I squeezed the new receiver in, wired it all back up and it worked!
Future Work
Sir RoBert needs some time spend on code to get him balanced out but otherwise he should be able to roam, avoid to a degree, dance with RC, play a few songs, and do the hokey pokey like most of my other bots. It’s all there, it’s just a matter of tuning settings for this particular platform but what I like about Sir RoBert is that he doesn’t look like a “robot” thrown together with scrap parts, he actually looks like a little toy guy.

Unintended Results
MaxHires and I talked a bit in the shoutbox about how bad code creates good, or at least interesting results and Sir RoBert does have some of that. There is still some issue with conflicting libraries, timers, or interrupts so the servos have the “jitters”.. BUT since Sir Robert is supposed to be old I’m just passing it off as being an “old man”.

Tuesday, January 7, 2014

Buford Highwater Micro Robot

Buford Highwater

Yeah, that is a silly name for a big bad “Robot” but for some reason it just hit me while trying to piece him together and he’s a tiny fellow anyhow. Buford was really an afterthought when I finished Lilliputian. I had started the original Yahmez MicRObot challengeentry with the concept of a dual ATTiny85 bot, one for brain, other for motors but gave up and used a ProMini clone instead. After looking at the left over parts for a bit I thought surely I can throw something together with these. Besides I had yet to build any actual robot with one of the ATTiny85’s I’ve had for a while.
Update 01/04/2014 - Added Schematic at the Bottom
Buford’s Pants


Buford’s pants are a 3d printed mount found on Thingiverse. I found the part some time ago but never really had a good plan for it. The GM15 gear motors are actually too small for the mount and I didn’t really want to burn time modifying the part so I wrapped them up in some green electrical tape. Once the pants were done I thought a 3.7v 240mah LiPo battery might make a good “backbone” so the hot glue gun came out and he was now upright.
Buford is a pretty minimalistic bot featuring the two GM15 gear head motors mounted in the “pants”, the battery forming the backbone and some small 3D printed “third legs” to hold him up. The wheels are Lego gears and the tires were from Lego as well I believe or maybe somewhere else. For driving the motors a couple 2N2222 transistors were used which allow only forward motion for each side. Seemed the only way to keep things small enough for the platform and is very easy to do.

Buford’s Head
With the 8 pin socket for the ATTiny85 in the middle I sketched out a layout to allow two LDR’s for eyes, a couple transistors to drive the motors, matched up the needed resistors for the LDRs and transistors and then mounted an IR sensors below for his mouth like feature. After digging around for ATTiny85 IR code online and thinking about how Buford was going to be a mute with no sound output as there were no more I/O pins, I decided to change out the IR receiver and put a tiny speaker I had salvaged from an old cell phone. The tiny square speaker mount fits nicely below the Tiny chip and although not loud, provides enough noise to make him a little more menacing… I mean annoying.
The back side of the board is a little messy, especially considering I took the time to draw up and layout the whole wiring scheme, followed it exactly and THEN realized I designed the LDR’s with the resistors going to the input pins instead of to ground. “Face palm” time. That error made me go back, cut up / out some of the wiring and get it right the second try.
To spice up his head I added a couple green LEDs in parallel to his drive motors on the back of the board which glow depending on how hard that motor is being driven. Because the GM15’s are pretty high geared and the wheels/tires are pretty large he is way too fast for his own good so the PWM rate is extremely low and hard to control but he does move at least.
To get power to the board I thought about a few options but did not have a tiny double throw on/off switch that would allow charging the battery in OFF mode so I just added a two pin header, extended it a bit to make it look like “hair” and added a connector to the battery wires. Kind of looks like a pony tail from the back.
I tried to make his board have some resemblance of a “face” with the two LDR’s up top for eyes, the 8 pin CPU for a nose and the speaker for his mouth. No clue what the resistors are, warts maybe. The two transistor kind of stick out there. I had thought about maybe some tiny hands but he looks good enough to me for now.
Buford’s Brain
There’s not much there to start with but he does have 8K of empty space to fill so he can do a few things. He should be able to 1) Track Light; i.e. sit still and rotate to face the brightest until he is balance, 2) Hide from Light; same thing but avoid light, 3)Follow Light; move towards the brightest light until close enough, 4) Run from Light; turn away from the light and keep moving until dark enough.
I started to code up some options for selecting modes by covering up the LDRs, you can pretty easily do three different settings by fully covering up the 1) Left, 2) Right or 3) Both for three options. BUT then I really thought about how easy it is to swap out the ATTiny85 and how many of them I had here so I just changed variables and burned a chip for each mode. I can then swap them out as desired. Not optimal solution but quick and dirty way of making it happend.
So far Buford can track light and follow it in a kludgy but walking like wobble which I actually kind of like and turn away and run away from light. Nothing special for sure. There is still plenty of code space left with the current code taking about 3K of the 8K available. Unfortunately the speaker output is not very loud so trying to make much sound isn’t near as noticeable as I’d hoped. Additionally I guess the ATTiny85 doesn’t support the Tone() function to play musical notes so something else would have to be done to play any type of “music”, if you can call it that.

Parts List
To summarize what makes up Buford here is the summary of the parts list:
2 x GM15 motors
2 x Lego “Gears”
2 x Rubber tires off something
1 x 3d Printed “pants”
3 x 3d Printed rear supports (only two needed but I tried a tripod setup that didn’t work)
1 x 3.7v lipo battery
1 x 1” circular perf board
1 x 8 pin ic socket
1 x ATTiny85 (or more if you want to program up various modes)
2 x 10k resistors for LDR
2 x LDR devices
2 x 2N2222 transistors
2 x 1K resistors for transistors
2 x bright green LEDs
1 x cell phone speaker
2x 2 pin 90 degree header pins
1x 2 position female pins and header
1x pull your hair out soldering session on the back to make it work

Wow, ok, there are a lot more parts there than I thought but it’s still pretty simple

Closing

So there is Buford Highwater. Only took about 8 hours on and off total messing with ideas, code, etc to put it all together. I obviously reused code from my other bots for the base code, just stripped out all the other libraries and music functions that were not needed.

So he’s Buford, he’s bad, and he’s big… well, no, he’s actually tiny… ATTiny too but he’s still a menace.


Stay out of trouble Buford!

Update 01/04/2014 - Schematic
Maxhires has asked about the schematic and driving the motors etc from the ATTiny85 so here's how I did it. I'm sure there are btter ways out there but this does work. Notice I am driving the little speaker directly from a pin. I've done this for all my bots with sound without issues but remember these are tiny speakers so I would guess lower current.