Blog

  • The keyboard helper

    I was talking with a friend who has a big problem.  His son can’t use a keyboard but loves to play computer games.  He can only use a mouse and only with his right hand.  He has very limited abilities in his left.  It became clear after our conversation that if we put our heads together we could make something that might enable him to play the different computer games with more ease and enjoyment.

    New video link added at the end of this posting.

    We imagined a joystick that could be used to maybe send different keystrokes to the keyboard via some device.  I took this problem home and below is what became “the keyboard helper”.

    KeyHelper1

    The Leonardo has a great capability; It can emulate a keyboard and mouse.  Using this as the core of the new device I tested a number of code snippets   I was able to send words and keystrokes to Notepad, what fun!  The next thing was to read analog ports connected to a joystick.  There are a ton of examples on the web, I got this running quickly.  To wire up the joystick I needed to tie in some resistors.  I’ll try to explain why they are on the circuit later.  The last part was to add an LCD display for some visual feedback.  I thought it would be important and we found out after the fact that it ended up having a very different function than what I had first envisioned.  LCD displays can be hooked up in a few different ways the most common are parallel (all pins) or via some type of intermediate device that you to talk to via a serial or i2c interface.  I had an i2c to LCD kit from an old project and decided to re-use this (the link is to a more recent iteration).  The LCD display itself was pulled out of an old PBX phone, it had some odd pinouts but normal LCDs you find on the web will be simple to wire up.

    On a 2 hr flight, I crafted most of my notes on how I felt the “system” would work.

    KeyHelper5

    I’d present a grid on the 2 line display of the characters Q W E R.

    ________Q__W______

    ________E__R_______

    Something like the above. When you tell the LCD to use a blinking cursor and then move to a position on top of a letter – it looks selected.  By moving the cursor over each letter as the joystick moves – you can see what letter is available to be typed to the computer.  Great visual feedback.  In the above diagram suppose Q is high lighted.  The movement UP or LEFT on the joystick would then send the letter Q to the keyboard.  A movement DOWN would select E but not send E.  Once on E a movement LEFT or DOWN would send E to the keyboard.  Scroll to the letter needed then move -off- the screen to send it to the computer.

    KeyHelper6

    That’s how the 1.0 version functioned. There was some immediate feedback as the game being played changed.  It would be preferred to hold the key down and not just type one letter.  Selecting the letters became less critical as now it was a matter of just holding down the key and there were only 4 to send.  Here is the resulting logic main loop of the program that shows this modified approach.

    void loop()
    {
     center = 1; 
     up = map(analogRead(0),0,1023,0,1);    // Q MoveTo(0,9); 
     left = map(analogRead(1),0,1023,0,1);  // E MoveTo(1,9); 
     down = map(analogRead(2),0,1023,0,1);  // R MoveTo(1,11);
     right = map(analogRead(3),0,1023,0,1); // W MoveTo(0,11);
    
     if (up) {
     Keyboard.press('q');
     MoveTo(0,9);
     center = 0;
     }
     if (left) {
     Keyboard.press('e');
     MoveTo(1,9); 
     center = 0;
     }
     if (down) {
     Keyboard.press('r');
     MoveTo(1,11);
     center = 0;
     }
     if (right) {
     Keyboard.press('w');
     MoveTo(0,11);
     center = 0;
     }
     if (center) {
     Keyboard.releaseAll();
     MoveTo(0,0);
     }
    }

    The letters are now being sent as lower case. What’s nice about this approach is the MAP function.  It has a lot of uses.  Here it converts the range 0 to 1023 into the range 0 to 1.  This enables the code to read both momentary switch type joysticks or analog potentiometer joy sticks (we’ve used both in our prototypes).

    Mental Note: if two states are on at the same time does the keyboard function send both or does the last one sent win?  Think to move on a diagonal in a game and how the code above may or may not enable this.

    I am working on a wiring diagram it is going to be a while until I either build a second version or I can borrow back the one I’ve built for a day to recall the exact details.  Like I said above – examples for each element of this are easy to find on the web – you should not have much trouble.

    A working version of the code (assuming you use the right pins with your LCD and such) is here.  As my LCD and I2C are probably different from yours – there will need to be some adjustments in the commands sent to the LCD (maybe).

    I liked this project for a number of reasons.

    1. Jerry is a much happier camper now. UPDATE BELOW
    2. I had no idea how great that would make me feel.
    3. Game control is vastly improved.
    4. The project was small in scope and I was clear on the goal.

    Thank you for reading.  There is not too much more to say about this project at this time.  It will be a while but the circuit will be doodled up some day.

    Go make stuff.

    The LCD took on an unexpected use:  It happens that the joystick needs to be positioned just right.  Exactly right.  Such that the limited motion of the left hand can move in the 4 directions.  It takes some time to get this center point just right.  The LCD will be highlighting the direction of the “problem” and my friend can use this as visual feedback until he gets both the joystick and hand centered.

    UPDATE. The fine film crew at work put together this video of the project’s impact.

     

     

     

  • Chip programmer with a twist

    I am working on 1000 projects all the time.  You may already know that of me.  This one will be a fun adventure.  I’ve started by shrimping.it this is a site where they show you how to build a bare-bones Arduino.  I went and ordered the part for 4 kits via the electronics seller http://www.taydaelectronics.com/ it was under $30 for all the parts I needed.  I did not get boards as I plan to design my own at a later phase. Shrimp + SPI to 8 pin chip  Here’s the shrimp built with an 8 pin chip holder where it can be used to program the little chip.  This is an Atmel ATTiny 85 ready to be programmed.

    Now the hard part.  Let’s say I want to program a lot of these little chips.  Wouldn’t it be nice if the Arduino held in memory all the code and capabilities to program the chip without an attached USB link to a computer?  That’s goal #2.

    random blickers

    Here is an ATTiny 85 running code that was pushed through the Arduino in the traditional manner (Goal #1).  What I like about the Tiny line of chips is there is little to no supporting hardware required to have them run.  This makes them a lot of fun for all kinds of little builds.  They will even run off three or 4 AAA batteries and for quite some time.

  • Engineering Roundtable – Audio Spectrum Analysis and Fire!

    In today’s edition of “Engineering Roundtable,” SparkFun Engineer Chris Taylor guides you through the use of a microcontroller to perform audio spectrum analysis. He explains the basics of working with the audio spectrum and ultimately links up his project with a propane torch. Why? Well…why not? Check it out:

    You can find the Vimeo version here

    Feel free to leave any comments or questions in the comments section below and we’ll do our best to answer them! Thanks for watching and we’ll see you again soon with another edition of “Engineering Roundtable!”

    via [SparkFun Electronics – Recent News Posts](http://www.sparkfun.com/news/1051)

  • Current electric highway

    (puns are fun) This is a google map showing the current supercharging stations. From this alone, you should be able to get to any destination within 100 Miles of any of these locations and do so without any range anxiety. If your final destination has charging options then you can be comfortable within 200 miles of any of these locations. If you look into public charging stations you can probably cross the country in any direction. By 2015 the Tesla stations should enable cross-country trips with ease. I am going to get to know California then the country.

    If you are listening Tesla – Phoenix next; I have travel plans and a place to stay all ready to execute.

    View Larger Map

    http://www.teslamotors.com/supercharger


  • The Tesla Model S charge port, juice er up fella!

    Charge It!A mini fact:  So far the average charge time for the car has been about 2 hours for a normal day to work and back.  If I drive more conservatively someday perhaps that time will come down (unlikely anytime soon).  In the photo, the surface that looks like a button is indeed one.  When you push this the little flap, that is part of the running lights, pops open.  Push the plug into the car and the green ring will light up.  Pulsing slowly or quickly depending upon the current battery level.  Press the button again to pull out the plug.  All of that will only work if you have the key fob with you.  I tried to remove the plug when the key fob was in the house and it would not unlock/come out.  Also, the car can detect the plug is in and will not let you drive off.  Good thing for those (not yet fully) caffeinated early morning departures.  I am not keen to look at the PG&E bill but will do so shortly to see how we are doing in that regard.

    On a slightly different note today all driving about has been electric.  A gas-free day today.  I’ll maybe start tracking the car and bike usage (all cars and bikes).  When the cars are used to do anything that counts and if the bikes are used to do anything useful other than exercise that will count.  In a gas-free world, I’d take my electric bike to work while the rest of the day’s outings would be in the Tesla.  A fully electric day.  Half and half would be we use 1 gas and one electric.  Full gas would be we used no electric.  There will be the odd day we don’t go any place at all.  I should probably track this on a Google sheet.

    Lastly will be doing the daily cash costs of gas vs electric from the simple fueling only perspective.  I am certain if I use all the gas items from the CC bills over the last year and the electric bills there should be some way to see how much money shifted to electric and if there are any savings at this level.  That’s data collection so someday soon again.

  • Tesla Model S is here.

    The Tesla Model S is a thrill to drive.  I love speed and acceleration so it is a good fit.  To say it has all the features of an electric car sells it short.  It has all the features of any car you’d ever really want.  It just happens to be electric.  A few posts will be here over time about the car and when there are interesting developments but otherwise expect the hardware and geekery that’s considered normal.

    Today I drive the car to work for the first time.  My impression of the car, dark in the garage, fully charged, was one of latent power.  For an odd reason, I perceive it as asleep and not off.  Odd that I perceived anything of this nature in fact.

    First hours of ownership, why not drive the coast for a while.
    First hours of ownership, why not drive the coast for a while.

    Hi ho hi ho.

  • Stock Bot to Arduino

    The original StockBot was built on the Netduino platform.  I’ve been working on the code for the Arduino platform and have now assembled working code.  I can’t claim it is stable yet but it’s doing the job for now.

    I am using the Ethernet Arduino.  As I explore a number of things all the time, I have also made a shield for the Arduino to see if this project could become a kit for others to build.  A little stuck on a source for Numitron tubes so I am trying to make the board generic enough to take a tube or a normal led display (still puzzling that through).

    Let me clean up the code – I’ll take a hard look at it over the next month.  Maybe after the skis hit the slopes in Whistler I’ll have something to post and walk everyone through. Early December if you don’t ski or board.

    What’s StockBot – here’s the beginning post

    Here are the prototype boards I had made.  They have a nasty bug but I learned something (and could fix it so all is good).

  • Your passwords sux!

    I have facebooked that LastPass is the tool everyone needs to be using.  I am not always clear as to why I select the tools that deserve your attention.  Every week I get some news and security tidbits from the below podcasts.  What I love about this particular source of information is that Steve Gibson provides ALL the details, dives deep and leaves no stones unturned.  I know this is the second post in a row about Steve’s stuff – but I really did get a Facebook message from a cousin today asking why he should trust LastPass with his passwords.

    The short answer is that LastPass does not get your passwords (not exactly).  All that is sent to them is your encrypted stuff.

    Most if not all of the password decryption runs in your browser – but it may look like it is on their site.  I am no longer 100% clear on this but myself I will have to re-listen to the first podcast below.

    Lastpass and why you can trust it:
    Text http://www.grc.com/sn/sn-256.htm Audio http://media.grc.com/sn/SN-256.mp3

    Lastpass and why you should use it:
    Text http://www.grc.com/sn/sn-366.htm Audio http://media.grc.com/sn/SN-366.mp3

    There are some password recovery items the paranoid should look into and disable (but think, know, trust, what you are doing when you do so).

    Always Swim Up

  • Knowledge is the reset button

    This post is about how knowledge and research can change your life.  A while back I made a simple internal pact with myself.  If I hit 200 LB I’ll just stop eating.  Funny thing is, that worked for three or more years.  I should mention there was a prior limit set at 195 LB.  Before that, I was not really watching.  Weight gain was depressing and all, but not getting in the way as far as I could tell (my doctor had been saying otherwise, but it fell on deaf ears).  When I started to mull over setting the limit to 205 LB I had to put my mental foot down and say no.  At that point, it came to starve a few extra hours a week to force the 200 LB limit into remaining valid.  That was probably going to be the rest of my days – fighting the 200 LB limit.  In fact, I had already resigned to it.

    Diets for me are transient.  I’ll start on one once in awhile.  Never with true intent.  Never with passion.  Never with any successes.  Sure a few pounds at the start – yippie!

    The 200 LB limit sat at the back of my brain taking up undeserved space while injecting the fear of getting set higher and higher over time.  I did not want another diet, I did not want to exercise a ton, I wanted to make sustainable healthy changes that put my weight on a downward slope, however slight, just point it down.

    Then I learned something.  In one hour.  I was lead down the simple path of well-presented information to the knowledge that reset the way I look at everything.  I’ve recently “let my weight drop” and put it on that downward slope.  What a crazy sentence. It seems to imply I have control over the angle of the slope.  I do.  Today, for instance, I woke up to a 175 LB me. Nice!

    What worked for me was simply adding quality knowledge about the human body to my brain. What is a protein, a fat, a carb, a sugar, a ketone?  What of these do I eat or process?  Knowing more about these; what simple changes can I make to effect the changes I have long desired?

    It is difficult to find something that’s posted in/on the Internet without agenda.  I’ll try not to lie.  I want you to go out and learn how to learn.  How to filter the noise.  How to know when you don’t know.  I am not teaching these things, they are milestones on your way to finding the reset buttons in your life.

    All I can share is what got me excited about learning to learn and to carve through the noise to find the pure notes of relevant research.

    I listen to a security-related podcast every week.  By Steve Gibson.  Called “Security Now”.  If you are in IT or a geek like me you’ll find it wonderful.  Regardless, what happened out of the blue one day was; Steve did a health-related podcast about vitamin D.  Why?  I didn’t care, I got to listen to a very capable explainer explain all about vitamin D.  He consistently applies significant time and energy to each topic he presents on the podcast, this health episode was no different.  He even presented data he had collected from his own blood tests and experiments in sunbathing to collect vitamin D.

    Fast forward a bit in time and there was another unexpected health-related podcast – this time Steve had been experimenting on himself as it pertained to diet.  As like any security related podcast he taught you the basics and built upon them (over two podcasts this time).  By the end, I knew I had started my next chapter in life.  I have since played the podcasts a few more times, bought and read two of the books Steve recommended, initiated simple changes in my daily food types, and lost 25 LB since May this year (4 months).  I have also since learned (as yet another chapter of life unfolds) that without quality data and research you are courting a mundane and manipulated life.

    Question everything.  Question this blog post.  Research and return.  Question more.

     


     

  • New proposed TLD .pinkbunny

    A new top-level domain (TLD) is being proposed to  B’ecause’ I CAN as a safe alternative to existing domain namespace.  The “.pinkbunny” domain will be aimed at those organizations requiring a high level of trust and security of their websites, such as kids with pink bunnies, those who may have lost a pink bunny and other critical infrastructure sites that deal with pink bunnies.
    The proposal is that organizations successfully registering a site within the “.pinkbunny” domain space would need to undergo a thorough background check and also adhere to a number of strict security requirements such as photographic proof of said pink bunny and regular visits to the vet for checkups to ensure no virus infections.  Any sites not adhering to the security policies would be disconnected.  B(ecause) I CAN is currently reviewing submissions for new TLDs and is expected to publish its results over the coming weeks.