Monday, December 16, 2013

Serial Communications and Command Processing

Serial Communications and Command Processing

After learning about the wonderful handling of interrupts that the ARM Cortex processors sport, I went right after it, setting up interrupt handling of serial communications, effects processing, and command processing. Let us set aside the first two and dive into command processing.

After all, what fun would it be if we had all these LED effects and patterns set in the Teensy 3.1 and have no way to tweak them, or trigger them, other than to loop through them with a fixed timer of some sort? No fun at all I think. I mean, sure! They will look stunning as they fade from green to red, sparkle with fade effects. But unless they are linked to something, like music, or a movie clip, they are just effects running a set script that has no life at all. 

So, we established serial communications with the blue tooth, and my laptop, but unless I plan to sit by the door and manually trigger the effects with the laptop, I need a way to send commands to the effects processor (currently the Teensy 3.1) from another controller, that makes decisions based on numerous input conditions.

The Teensy 3.1 can handle all of that on its own I'm sure, but this isn't about efficiency. It's about performance, breaking out all the tech I have available. I can downscale later. Right now, let's add whatever we need to get the job done!

So we need a command processor. A way to interpret commands from another controller, act on those commands with parameters, and offer feedback through the same communications link. 

This offered a mix of issues, most of which attributed to my rusty experience with dealing with strings in C and C++. I broke all the rules here, but I got what I needed. The ability to send a command, have that realized and pushed onto a command stack, pulled at will and processed, rinse and repeat. The only annoying issue is that I have a carriage return character that seems to appear before every entered command. Using the replaced Teensy 3.0 to send automated commands to the project will hopefully fix this issue.

And that is where I am at right now. I have both Teensy's bread boarded and ready to test. Once I get past this hurdle, it will be time to work on the LED effects processor. And that will be the next post.

STAY TUNED!

More when I code it...

New Teensy 3.1!!

My new Teensy 3.1 arrived in the mail today. Yes, a standard envelope because it is so freaking SMALL! I immediately soldered on headers because I was afraid I would lose it!

The new Teensy sports a beefier processor that doubles the flash memory for programs and quadruples the ram! It is also faster. Running at 72 MHz now instead of 48 MHz, and still has the overclock at 96 MHz.

Thursday, December 12, 2013

Bluetooth Module - R&D, Testing, and the Code that Makes Use of It.

A lot of trial and error with this board, and it wasn't necessarily the board's fault. When you have more than one component that has to be tweaked to work in a system, it's hard to balance and find a working solution. Add to that a third party, and you have chaos that leads to an endless stream of expletives and uncontrollably thrown f-bombs!

I had a fourth party even. Maybe even a fifth if you count Putty and Window's quirkiness. Hey! Let's just add enough butterfly-effect devices and software to a new system and hope for the perfect storm of conditions to make it work! No wonder my new projects take infinity to become born!

Anyway, all rants aside, I achieved success after spending almost a whole day working on it. And now that I have you wondering what the hell I am talking about, let me clue you in.

Monday, December 2, 2013

Parts / Modules I Will Use and Exploit

Super Spectacular Christmas Door Wreath

Waiting for the Mail Man!

I thought I would write more about the hardware for this project while I wait for the guys in the vans to show up.

A lot of this stuff isn't necessary, but since I have it on my bench, I thought I would throw whatever I wanted at this project. I just hope the wreath mount that hangs over the top of the door can handle it!

The parts list looks like the ingredients of one of my recipes, or at least it is as busy as that.

Below is an outline of the hardware, and it's contribution to this masterpiece!


Sunday, December 1, 2013

Super Spectacular Christmas Door Wreath

Turn That Door Decor into a Eye Catching Holiday Show!

The common Christmas wreath for your front door adds a bit of holiday cheer to visiting family, neighbors, friends, or even yourself. You come up to your front door and see the wreath, and you are just filled with holiday spirit! It helps to wash away your work day and prepare you for the holiday spirit that awaits you inside.

But it is what it is. Albeit a nice arrangement, it just sits there. Not offering any mood changing experiences at all outside of what it stands for. You might be an interior decorator, specializing in holiday decor, so you might admire the placement of the pine cones, or the other Fall trim. But if not, you see just another wreath.

OR!

You could spice it up a bit, kick it up a notch mind you. Give it some interactive charm and pizzazz! Something that blows their shoes AND socks off before they walk in! Now you wouldn't even have to ask your guests to remove their shoes before walking in. They will be off and hanging in the front lawn's tree!

OK, maybe their footwear will not rocket off their feet at the site of this new creation, but they will be mesmerized to a point where they CAN wait for you to answer the door.

How?

We decorate it. With LIGHTS! Oh yeah! Not just some boring old string of incandescence, but bright and colorful LED lights! And not some stationary color or brightness, we animate it! After all, adding static lights is just more trim for an non-animated decoration.

But we will not stop there. We will also add a screen in that unexplored hole in the middle. Donuts have holes, reminding you that you paid for that hole that offers you nothing to enjoy. My favorite donuts have always been the fruit filled solid pucks of a donut. You get what you pay for!!

Anyway, this screen will of course show something. I can't think of anything better than the choice clippings of holiday fantastic works like It's a Wonderful Life! or, The Bishop's Wife. Perhaps A Christmas Story and Rudolph the Red Nosed Reindeer! And why not make the light show sync with the audio of these clips? SURE!

But what we have now is a stage show of a wreath. How the heck are we going to pull all this off?? EASY! We throw microcontrollers at it!

And that is what this blog will be about. My quest to enhance an already beautiful wreath with the most embedded holiday cheer my mind can offer!

Stay tuned! It will be an awesome ride!

More when I discover, build, and code it. =)