Google Analytics

Friday, March 23, 2012

Banjo and Wife Take Tai Chi Lessons



What my wife looks like doing Tai Chi
My wife and I have recently started a Tai Chi class, attending once a week. She never looked better. She manages a grace that, so far, has eluded me.  I don't let that bother me.

Our instructor plays flute music. All Tai Chi instructors appear to do this. I think they do this to cover up the grunts. I played music all through high school and college, so I enjoy music. But this music doesn't appear to have a beginning or an end. It's always in the middle of whatever piece they are playing. It never goes anywhere. It starts in the middle, meanders around, and ends in the middle. Who thinks up music like this? I think they need some BBQ, then they can get somewhere, and have a start, middle, and end, instead of all this wandering around.

What I look like doing Tai Chi
We do things with our arms. And then we do things with our legs. The music facilitates this, as arms, legs and music are all wandering. Sometimes I just stand and stare at my arms – they are doing things I don't remember issuing commands to do. Sort of like autonomous arms, I guess. I don't know if this is good or bad, but I'm keeping an eye on them just in case they start to do something embarrassing or illegal. I don't think I'll be able to stop them, but I'm keeping an eye on them anyway.

I have to remember to keep my mouth closed. All this wandering about makes it want to gap open.

It's important to keep your toes pointed in the correct direction.  Mine want to wander.  Some people go barefoot, but I keep my shoes on so all my toes are forced to go in the same direction.  It's also important to use your head.  He hasn't said why yet, but I can tell by his looks at me that this is important.  Someday I'll figure this part out.  In the meantime, I'm busy keeping my toes pointed in the right direction, my head doing something as yet unknown, and my gaped-open mouth closed.  This all keeps me pretty busy.  My wife is not amused.  A husband can tell.

Sometimes we stand on one leg, and for some reason, yet unknown, we extend that leg. I'm glad nobody from my old hometown can see me like this. We don't go any where with it, just put it out there, then bring it back in and put it right back where it was before. We do it s-l-o-w. Then we do it again, except with the other leg. At least, I think we do.

Whatever.

Sometimes my arms do something like you might think a propeller would do, if a propeller had arms. It's been my experience, making buzzing sounds while doing this doesn't appear to be part of the approved plan. My instructor has a bald head; when he frowns, like when I'm making buzzing sounds, it goes up all the way from his eyebrows, up over the top of his head, and down his neck to his shoulders. You can see it. It's like one of those Chinese dogs – Sharpies, or something like that – the one with all the wrinkles - whatever. It's almost worth the price of admission to see that. But, seeing it once was enough – remember when they told you, as a kid, not to cross your eyes, or they might get stuck - so I don't do that any more – I don't want him stuck like that.  Did I say my wife was not amused? A husband can tell.

We do other things, all of which have names, but none of which appear to have anything to do with the names given them. We do brushing knees, first one, then the other. We brush them without touching them. It reminds me of how I cleaned my house when I was a bachelor.

We do parting horses manes, first the horse on one side, then the other horse. It's never the same horse, so I don't try to learn the horses names. It's probably better that way. It'd be my luck to get a frilly horse, one with ribbons that wants me to use a comb, when what I was really wanting was a Mustang, snorting and … oh, never mind.

We also push clouds around. Then we stand on one leg, push it out, then the other leg. But we don't go anywhere.  I can't tell if I'm pushing the clouds right or not; I can't see them.  I'm apparently the only one that can't see them, because everyone else is doing this with great enthusiasm.  I don't let that bother me either.

Sometimes, while doing things with our legs, we twirl our arms. At least, I twirl my arms; my wife appears to be doing some sort of smooth, silky ballet, performed with grace and elegance; what I do reminds me of hanging tobacco in barns to cure when I was a boy. No body accused me of dancing ballet then, nor are they likely to do so now.

Everything is done deliberately. There appears to be two speeds: slow, and real slow. I thought at first we were going slow so we could learn better, but I think the more we learn, the slower we are going. It might be the music.

I have to say I'm excelling at breathing. People are turning to stare, so I'm taking quite pride in that. It's apparent they think I know what I'm doing, and hope to learn from the master. I can also stand on one leg pretty good now, then the other. But I never seem to go anywhere.

I think things would work better if they got some new names for the different moves. I even wonder if they got them translated right. Wouldn't it be funny if, instead of parting horse's mane, it really meant baiting a hook?

Here are some names that I think would work better:

  • Pushing off a seat on MARTA. This would consist of lowering oneself onto one leg, while extending the other, to gently push off nappers so you can sit down.
  • One legged twirl. You extend one leg, holding it by the toe with one hand, while extending the other arm up in the air, all the while hopping on the other leg. I think the Russians have a dance similar to this, called the Putin Vodka Punch Roll.
  • Parting Lion's mane. This would consist of a quick forward thrust with one arm then the other arm, on a sleeping lion. This time, the legs are picking up and putting down as fast as they will go, and you are going somewhere, or else you're dinner.
  • Bowling clouds. Left arm comes up to your chin, where it grabs a cloud and moves it aside. Meanwhile, the other arm is coming up to do the same thing. Where these clouds are coming from, nobody has said, nor where they are going. However, with one leg in the air, turn, squat, and lay that sucker down the hall for a strike.
  • Old man grunt. This is where you extend one arm up high, do something with the palm, count your thumbs; turn real slow, sweep the floor with it, grunt, and repeat until you no longer grunt, or death, whichever comes first.
  • Saturday Night Fever. In this one, you try to look like John Travolta. Or in my case, you just try to stand with one arm up high, and the other is down low, with the finger pointed. Shake your hips some. It's hard to find a beat with that meditation music, but I never let not finding the beat get in my way before, so I'm not going to start worrying about that now.
  • One Quack Waddle. This is where you pick your leg up s-l-o-w-l-y, then semi-squat on the other. Then, with one hand in the air, and the other hand stretched out in front of you, with your palm up, wiggle your hips while scooting forwards. It works better on a wooden floor; unfortunately, our floor is carpeted, so I keep pitching forward, doing face-plants. That's OK, because everybody appears to enjoy pointing and laughing, and you get bonus points if you quack while falling forward s-l-o-w-l-y.

There appears to be a correct way to do everything. So far, it has eluded me.  I'm not holding out much hope for the future either.

I was told tonight to extend my left arm, to put my left palm facing me. I would know that I had done it right because the thumb on my left had would be pointing to my right. Meanwhile, stand on one leg.

Try as I might, I was unable to put my left palm facing me, and have the thumb on that hand be on my right. My dumb left hand's thumb just kept ending up on the left when I had my palm facing me. I must have the wrong thumb on the wrong hand, or the right thumb on the left hand. Or something like that. I'm not even sure what that means, I'm so confused.  My wife is concerned.  A husband can tell.

So far, I can say this with authority: my wife looks good doing this, and I can stand on one leg. I'm not sure why yet, but I'm doing it. Along with breathing and grunting.


APPLE (AAPL) - This is what a Flash Crash looks like

Today, at 10:57, Apple (symbol AAPL) had a whopper of a drop, with some systems (CNBC) showing a 9% drop, while my service (Think or Swim) is showing it dropping 1.3% from 598 to 590 .  This was not a high volume dump of the stock - instead, it was a regular volume trade.

Some media reports, (CNBC for instance http://www.cnbc.com/id/46835129) are calling this a Flash Crash, and saying: Apple Flash Crash: Stock Halted After Trade Causes 9% Plunge.

My chart (see picture), which is showing data from "Think or Swim", shows a drop from 598 to 590, which is 8/598, or 1.3%.  So, I don't know which report is correct, since the math appears to be different between the two systems..  Of course, the system I use for stock trading, Think Or Swim, may not have captured the whole move.

Also, I don't see any evidence that the stock has halted trading - have a look at the picture yourself - it's still moving around as I post this.

Anyway, here's the picture!


Thursday, March 22, 2012

Stock Market - interpreting volume

I watch $UPVOL - $DWNVOL (NYSE, up-volume is trading volume for shares increasing in price, while down-volume is trading volume for shares decreasing in price.  $UPVOL minus $DWNVOL is the difference in trading volume.  On market-down days, the difference will be negative, while on market-up days, the difference will be positive).  I have watched it for a long time, but today I gained more insight.

What I realized:


  • Constant slope means:
    • - No rate of change, no acceleration, constant speed.
    • - The rate of things changing is staying the same.
  • The size of a bar
    • - shows the amount of accelaration
    • - or rate of change
    • - continued acceleration down, changing slope down, shows panic
  • Downward direction means:
    • - The difference in the volume of stocks,  upVol vs dwnVol, is more down vol.
  • A change in the direction (e.g., slope up instead of down) of the slope
    • - shows a change in the sentiment

Tuesday, March 20, 2012

Using Arduino to read embedded AVR

If you are needing to communicate with an embedded project, then this may be the solution you need!

Building a stand-alone device such as a Multi-channel Thermocouple Reader with Datalogger is an ambitious project for a hobbyest.  Since it is my own design, it means, on my first cut, there isn't a PCB - everything is hand soldered - thus multiple opportunities for problems.

Being a stand-alone, embedded application (not built around Aruduino board, but instead built using the ATMEGA328P chip that is used on an Arduino) means Arduino's useful USB connection isn't there.

Program updates are pushed onto the ATMEGA chip via a ISP header I placed onto the board, using a programmer (in this case, I'm using the USBtinyISP programmer from Adafruit).   The ISP interface, which makes use of the MISO/MOSI interface, does not provide a way to communicate directly with the Arduino IDE Serial Monitor directly, so there's no easy way for me to observe data from the embedded ATMEGA, like there is on the Arduino (via Serial.print() statements).

I programmed some 'blink()' status LEDs, and that worked, but it is slow.  At some point during the build, I had enough working that I could output data directly to the SD Card, but to read that data entailed shutting down the power, pulling the card, inserting it into the PC, opening the file and reading it.  Reverse to put the card back into my project - slow....

I began to wonder if there wasn't some way I could use a separate Arduino UNO to serve as a communication hub between my embedded project and the PC running the Serial Monitor.

Looking around, I spotted this, which is using an Arduino to push a program onto an embedded chip.

There are two key things to take away from the schematic for the UNO:

  • The USB on the Arduino has an additional ATMEGA chip that enables communications, and sits between the USB and the ATMEGA328P that we program our projects onto.  
  • The TX and RX connections are used between these two chips for communications.
So, since these two chips are communicating, which is what I was wanting to do, I thought I should be able to emulate this connection.  I was getting all complicated with this before I spotted the statement: "To do, you remove the microcontroller from the Arduino board ", which meant I could pull out the Arduino's ATMEGA328P chip, then connect to my project, using the Arduino's RX and TX header (D0 & D1 on my Arduino).

I had been careful to keep the RX & TX pins unused on my project board, so it was a simple matter of soldering in two wires that I could then plug into the Arduino's RX & TX header.

Then I added some Serial.print() statements into my embedded project, and cranked it up and .... nothing appeared on my IDE's Serial Monitor.

So I reversed the wires, because this is a common issue with RX & TX - RX on one board has to connect to TX on the other board, and vice-verse, and you never know how it's been defined between the two boards, so always try swapping if it doesn't work.  

BANJO!  

It worked!  I was seeing my Serial.print() statements streaming by from my embedded project, using the Arduino as the communications hub!

Monday, March 12, 2012

Arduino - COM USB Unknown Device Problem

Every once in a while, while working on my Arduino stuff, I get this really aggravating problem, whereby my USB suddenly disappears.  This means I can't upload code to the Arduino, and I can't access the Serial Monitor to see what the Arduino might be printing out.  Windows, after working with it for weeks, if not months, suddenly decides it doesn't know what this device is!  It also decides that it will load a device driver for you.  And of course, once it's loaded this bad device driver, you can no longer talk to your Arduino.

To add insult to injury, you may have gone to the Control Panel -> Device Manager -> USB devices, and selected the 'Unknown Device', as Windows has labeled it, and attempt to update the device driver.  And that's when things really get pissie - Windows now tells me that it's using the right driver, so it's not going to do anything.

There are a lot of entries out in the web-o-sphere, where people are looking for answers to this.  Some of those answers will work, for some of the people.  Other peoples' problems might be too severe for those treatments, and so they are still looking for a solution - and I hope the solution I'm going to give you below is the one you need to make it work again!

First, try the other solutions you might find.  Only use these if those solutions haven't worked for you!!!


First, go to the Control Panel -> Device Manager, and delete every entry you see within the higher level USB entry.  In other words, in the Device Manager, enter the USB devices area, then in that area, delete everything.  Then shutdown (hard shutdown), to make sure all of the power is off of the motherboard and parts.  Now boot up. The system will start loading and defining the USB ports.  This might be all you need - it was for me a couple of times.  Try out your Arduino IDE software now.


If that didn't work, then go back and delete everything again.  Then, using a Registry Cleanup tool, like the one that comes with Symantic's Norton 360, run the Registry Cleanup.  This will remove any hanging port definitions that Windows changed when it decided it was going to help you earlier.  Shut down, boot back up, and see if things work.  Hopefully, you can stop here.

If you still aren't working, then make a backup of your sketch folders - you should have placed them somewhere else other than in the folders that hold the Arduino binaries anyway.  Then delete the Arduino binaries - the whole directory structure, from the top of the Arduino folders to the bottom, but remember - your sketch stuff and 3rd party libraries should be in another directory structure if you set things up properly.  Now download a new instance of Arduino, and install it (unless, of course, you still have the zip from your previous download of Arduino, in which case you can just install it again).  You are doing this because Arduino isn't currently 'installed' into the Windows program environment, so you can't 'uninstall' it either - you've got to delete stuff.  Now do the stuff you did earlier - USB deletions, Registry Cleanup, etc.  Now install the complete Arduino package.  See if your stuff works.  I hope it does!

If it doesn't then open the Arduino IDE, go to FILES, then open the 'prefereneces' - it will give you the file location, in the AppData directory (it may be hidden, in which case you'll have to override Windows and make it visable).  Now rename the preferences.txt file to something like presferences.txt.old.  Now restart the IDE; this will recreate the preferences.txt file.  Now try to see if you can access the port.  If not, then do everything from beginning to end, including the deletion and recreation of the preferences.txt file, and see if it works...I hope it does, because this has been the answer to all my problems that I've encountered!

Banjo