Arduino LED Fade from Blink Example

I’m messing around with my new Arduino UNO R3 and I just had a little personal success.  I modified the Hello World of the Arduino, the Blink example, to utilize an analog pin on the board to cause the LED to fade smoothly in and out.

Nothing amazing, and probably not the most efficient way to do this… but here is the code.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
  1/27/2012
  Fade in and out - original sketch without looking at example.
 */
 
int ledPin = 9;
 
void setup() {
  pinMode(ledPin, OUTPUT);     
}
 
void loop() {
  for(int x = 0; x < 200; x++) {
    analogWrite(ledPin, x);
    delay(10); 
  }
  for(int x = 200; x > 0; x--) {
    analogWrite(ledPin, x);
    delay(10); 
  }
  //while(1){} //end program (loop forever)
}

And just for kick, I’ll include the official Fade example that I just looked at. They did it a bit differently and more efficiently.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
int brightness = 0;    // how bright the LED is
int fadeAmount = 5;    // how many points to fade the LED by
 
void setup()  { 
  // declare pin 9 to be an output:
  pinMode(9, OUTPUT);
} 
 
void loop()  { 
  // set the brightness of pin 9:
  analogWrite(9, brightness);    
 
  // change the brightness for next time through the loop:
  brightness = brightness + fadeAmount;
 
  // reverse the direction of the fading at the ends of the fade: 
  if (brightness == 0 || brightness == 255) {
    fadeAmount = -fadeAmount ; 
  }     
  // wait for 10 milliseconds to see the dimming effect    
  delay(10);                            
}

Review of Great Planes RealFlight 6 – It is Amazing

I’ve been a computer gamer since 1980 and I don’t think I’ve actually played any game more than I have played Great Planes RealFlight R/C Simulator.  Okay, so it’s not technically a game, but I still seem to load it up almost every night and fly for a while.  The latest version of the software is RealFlight 6 and it is amazing.

RealFlight is expensive because it caters to a niche market… those who fly (or wish to fly) R/C aircraft.  A few years ago I was able to score a full copy of RealFlight 4.0 on eBay at a very good price.  It came with the official Interlink controller (required) as well.  A quick call to customer service fixed any issues with the software being previously registered to another person.  They are very helpful.

At some point I upgraded to RealFlight 4.5, and I believe it was a free upgrade if I remember correctly.  The sim was better than ever, and that is the version I flew with for a couple of years.  I added a couple of expansion packs and downloaded a ton of aircraft and aircraft from the swap site.  Great stuff, and a very fulfilling sim experience.

RealFlight 6 Helicopter Action

Recently I noticed that version 6 was out and I figured that was enough of a jump to justify an upgrade.  So I ordered a copy of the RealFlight 6 Upgrade on Amazon.  Frankly, I wasn’t completely sure what to expect.  What it really be any different?  Would the PC requirements jump up such that I would lose performance with a computer that hasn’t changed specs in years?

I ordered a copy of RealFlight 6 on Amazon and just installed it tonight.  Amazing.  I’m not sure exactly how to to describe it, but it just feels better in every way.  The graphics are better and much smoother.  In 4.5 I noticed graphics “jitter” every few seconds where the screen would pause for a microsecond.  Though annoying, it was something that I had learned to live with.  This is completely gone with version 6.  Buttery smooth is the only way to describe the visuals… even with everything turned up to max.

Quite realistic

The physics seem improved as well.  The extremely low ground-effect zone seems very much improved.  This matters a lot to me because I find the most enjoyment in landing aircraft precisely and in a scale manner.  In 4.5, most aircraft seemed to just drop down when they leveled at about 1 foot off the deck.  All aircraft in 6 carry on right through this zone smoothly and with very good control.  Either that or I’m suddenly flying better all around.

I installed Expansion Packs 1 and 4 without any issue at all!  That’s good programming.  These expansion packs were released in 2006 and 2007 and they recognized RealFlight 6 (2011) without any problem at all.  They just work.

If you’ve ever been on the fence about dropping the bucks on an R/C simulator, I can’t recommend RealFlight 6 enough.  You won’t be disappointed.

New LEGO Friends Line for Girls and AFOL

The Brothers Brick did a fairly nice write up of a few of the new girl-oriented LEGO sets called LEGO Friends.  Some have protested that LEGOs are inherently gender neutral by design, and therefore don’t need a pink and purple themed girl-line.  While I fundamentally agree, I and many other AFOL welcomed the new sets and their unique pieces and colors.

My daughter has her eye on the LEGO Friends Heartlake Vet set, while I’m more interested in the Inventor Workshop… mostly due to the erlenmeyer flask piece.  Why don’t they include more of these in the set?

Anyway, here is the link to the Brothers Brick father-daughter review…

LEGO Friends – a father-daughter review
The Brothers Brick recently purchased several sets from the LEGO Friends line in order to give our readers a feel for the new line. My 11 year old daughter and I reviewed the following sets and I let my nieces (6 and 8 years old) play with the sets for …

Read more on The Brothers Brick

 

Help Stop SOPA/PIPA

This article is cloned from WordPress.org because it is so important.  The original author is Jane Wells.

—–

You are an agent of change. Has anyone ever told you that? Well, I just did, and I meant it.

Normally we stay away from from politics here at the official WordPress project — having users from all over the globe that span the political spectrum is evidence that we are doing our job and democratizing publishing, and we don’t want to alienate any of our users no matter how much some of us may disagree with some of them personally. Today, I’m breaking our no-politics rule, because there’s something going on in U.S. politics right now that we need to make sure you know about and understand, because it affects us all.

Using WordPress to blog, to publish, to communicate things online that once upon a time would have been relegated to an unread private journal (or simply remained unspoken, uncreated, unshared) makes you a part of one of the biggest changes in modern history: the democratization of publishing and the independent web. Every time you click Publish, you are a part of that change, whether you are posting canny political insight or a cat that makes you LOL. How would you feel if the web stopped being so free and independent? I’m concerned freaked right the heck out about the bills that threaten to do this, and as a participant in one of the biggest changes in modern history, you should be, too.

You may have heard people talking/blogging/twittering about SOPA — the Stop Online Piracy Act. The recent SOPA-related boycott of GoDaddy was all over the news, with many people expressing their outrage over the possibilities of SOPA, but when I ask people about SOPA and its sister bill in the Senate, PIPA (Protect IP Act), many don’t really know what the bills propose, or what we stand to lose. If you are not freaked out by SOPA/PIPA, please: for the next four minutes, instead of checking Facebook statuses, seeing who mentioned you on Twitter, or watching the latest episode of Sherlock*, watch this video (by Fight for the Future).

Some thoughts:

  • In the U.S. our legal system maintains that the burden of proof is on the accuser, and that people are innocent until proven guilty. This tenet seems to be on the chopping block when it comes to the web if these bills pass, as companies could shut down sites based on accusation alone.
  • Laws are not like lines of PHP; they are not easily reverted if someone wakes up and realizes there is a better way to do things. We should not be so quick to codify something this far-reaching.
  • The people writing these laws are not the people writing the independent web, and they are not out to protect it. We have to stand up for it ourselves.

Blogging is a form of activism. You can be an agent of change. Some people will tell you that taking action is useless, that online petitions, phone calls to representatives, and other actions won’t change a single mind, especially one that’s been convinced of something by lobbyist dollars. To those people, I repeat the words of Margaret Mead:

Never doubt that a small group of thoughtful, committed citizens can change the world. Indeed, it is the only thing that ever has.

We are not a small group. More than 60 million people use WordPress — it’s said to power about 15% of the web. We can make an impact, and you can be an agent of change. Go to Stop American Censorship for more information and a bunch of ways you can take action quickly, easily, and painlessly. The Senate votes in two weeks, and we need to help at least 41 more senators see reason before then. Please. Make your voice heard.

How to Reset a Lutron Faedra Dimmer Light Switch

We have a number of Lutron Faedra light switches in our home, and they have worked predictably (and awesomely) for many years.  However, just recently, one of the switches started exhibiting strange behavior.  When pressed, it would bring up the room lights to full maximum… which was not desired.  With a single press, the switches are supposed to only bring the lights up to the brightness that was last selected.  All of our Faedra switches have worked this way from day one.  Therefore, somehow this one problem switch had “lost” its programming.

Actually the solution was just the opposite!  The switch had GAINED a “Locked-in Preset” by accident.  According to the installation sheet, you can set a preset brightness to which the light will always return by rapidly tapping the switch 4 times.  The tiny LEDs will blink 2 times to indicate that a preset has been established.

To remove the “Locked-in Preset” you simply need to turn the light on and then tap the switch 4 times quickly.  The LEDs will blink 3 times indicating the preset was removed.  I did exactly this and the problem switch started working correctly again.

I hope this helps you.

Sorting through mountains of apps

Browsing apps is pretty frustrating now.

With 500,000 apps in the app store, old fashioned, simple, one-size-fits-all browsing techniques are not really good enough. The categorization and search-string filter system is way too primitive. Apple is going to have to do something to keep up with that scale.

Microsoft is up to 30,000 apps for Windows 7 Phone, I think I recently read. Even at that lower number, you are beginning to push limits of Apple’s rudimentary browser. It’s a very nice UI, don’t get me wrong. It’s approach is just not good enough too handle the mountain of apps they have now.

When I shop for one, I don’t want to find an app that is good enough. I want to find the one that is best for me. As things stand now, I might not see it. My grocery store has more aisles in it than Apple has categories and my grocery store does not have 500,000 kinds of food.

Sad that when we finally get a huge online store for software application shopping, the app we would most like to upgrade is the store itself.

Pro-religion comments cannot be well argued

I was reading through some blog comments just now and the thread was getting heated with respect to believers versus atheists when this little gem of a comment popped out of nowhere.  It is beautiful and perfect.

A pro-religious comment cannot (by its very own nature) be well-argued, as it is not based on anything observable nor any kind of objectivity, but on faith, which is an emotion. However strongly you feel you are right, those feelings have no impact on reality and thus cannot be applied to logic, and therefore, argument.

It should be noted that this comment was closely followed by this exchange:

Well put, Spock, but I’ll keep doing illogical things like LOVING, YEARNING, and practicing PHILOSOPHY, none of which, by your definition have any impact on reality.

And then…

You act on your emotions, which has an impact on reality. But the point is that simply believing in something has no impact on the actual existence of the thing.  Or, using your words, “LOVING, YEARNING, and practicing PHILOSOPHY” about something doesn’t mean it exists.  I love unicorns, for instance.

Where’s My Water – the best new Android app

This is quite possibly the best game ever created by Disney. Where’s My Water is the Angry Birds killer. I predict it will be the #1 app in a couple of weeks. Amazing stuff. I’m not sure if this is available on iOS, but here is a link for you fellow Android users.

Where’s My Water?

There is something extremely satisfying and addictive about the physics and puzzles used in this game.  After you solve a puzzle you cannot wait to see what the next one will be like.  Have fun!

The 7 Most Expensive Items on Amazon.com

A friend and I were discussing online shopping when we started wondering what the most expensive item sells for on Amazon.  I couldn’t figure out just exactly how to obtain this information, so I started running likely searches on Amazon to see what I could come up with.  It turned into a little game.

Considering that I am part of the Amazon Associates program, you would become my best pal if you were to actually purchase any of the items below.  Seriously.  Buy something right now.

So here is what I was able to uncover:

1) Waterfall Audio “Niagara” Stereo Speakers – $53,999

Judging by the customer photos, there actually are people out there who can afford these amazing works of stereophonic art!

2) Fujinon HA42x13.5ERD 13.5-570mm HDTV ENG-Style Stabilized Telephoto Zoom Lens with 2x Extender – $80,899.99

This appears to be an HDTV camera lens.  Just the lens!  It must be amazing though.

3) Sanyo PLV-HD2000 7000 Lumens 2048 x 1080 1000:1 LCD Projector – $49,999.99

Undoubtedly a wicked awesome projector on which to play the ultimate video games.

4) Ntm Standard3 20Tb W/External Storage Array Sata Raid5 – $102,935.80

Wow, who would have thought that 20TB of storage could cost over 100 thousand dollars.  Is this is a pricing error?  There are other obvious pricing errors that I have come across and ignored, but this one sort of seems legit.  Any idea why it is the most expensive item on our list so far?

5) Ceylon Sapphire and Diamond Pendant in 18kt yellow gold – $125,000.00

Apparently this is jewelry made by Cylons, and therefore extremely rare and expensive.  But seriously, I figured jewelry would certainly end up on this list.  I must say, this thing truly is beautiful.  Only 1 left is stock, don’t let it get away!

Ceylon Sapphire and Diamond Pendant in 18kt yellow gold

6) 16’1 x 16’1 Peach Persian Hand Knotted Silk Tabriz Round Rug – $94,510.00

At first I was like, meh, it’s just a rug.  Then I started looking at the detailed photos.  Pretty amazing work really.  This would make an awesome one of a kind Christmas gift.  Start shopping now.

7) Clive Christian Imperial Majesty Perfume for Women 16.9 oz Perfume – $435,000.00

Why not give perfume to your loved one this Christmas?  I would, if I were you.

There are atheists in foxholes

photo: Algerina Perna, Baltimore Sun


“The Army may not think atheism is a faith, but in fact atheist chaplains could help an atheist service member just as a Christian or Jewish chaplain can fortify believers. Army Capt. Ryan Jean, an intelligence officer at Ft. Meade, Md., is an atheist who seeks official recognition for nonbelievers on par with that of Christians, Jews and Muslims.”

(Read more on Los Angeles Times)

Yikes, this guy isn’t doing atheists any favors by campaigning to have it classified as a “faith” by the military, even if his intentions are good.  Atheism is absolutely not a faith.  It is quite the opposite.  Faith is accepting that something is true without any supporting evidence… the very definition of intellectual laziness.  Faith is the ultimate cop-out and the easiest of explanations.