Saturday, December 19, 2015

All that we are is the result of what we have thought.
The mind is everything. 
What we think, we become. 
--- Buddha

Today was a usual Saturday. Cleaning day, pay bills day, visit day, groceries day. And right now, play day.

Finished up all of my chores by 2 and realized that I could start playing with my new drone and the Arduino kit I got.

I started with the drone. First thing I had to do was track down some AAA batteries. That done, I read in the manual that the drone itself had to be charged. Luckily that can be done off any USB port on a computer and I have a free port at the left end of my keyboard. Plugged it in and let it charge. Later in the afternoon, I was curious if the drone would work. Detached USB charge cord, turned drone on, turned on controller.

At this point, I should have checked the manual to see how to make it fly with the controller. But all I wanted to see was if the drone recognized the controller. So I pushed a button; or two; and maybe some combinations. Mostly nothing happened until the darn thing jumped off the desk into the air, climbed at a 45 degree angle until it hit a wall, then crashed to the floor BEHIND the TV and its stand, a printer and its stand, the computer desk and its myriad wires. I shut the controller off. Peered over the printer to look down behind it and saw the little glowing LEDs on the drone's base. Better still, it had fallen between some wires and the wall and snagged on the wires. I just picked it up and shut it off. Back to the manual.

Of equal fun/frustration was the electronics kit. Before I could do anything, I realized that the tiny print in the tiny manual was too small to read even with a magnifying glass. So I had to enlarge the pages. I scanned a picture of the open manual from the printer into PhotoShop, blew up the image, fitted it to 8.5 x 10 paper. Printed it out. Enough pages to get started.

Assembled the Arduino motherboard and breadboard (a board for making an experimental model of an electric circuit). The next step was too download the Arduino software. Having had years of experience with software installation (since 1979), I expected problems. The first problem turned out to be that the operating system on my desk unit was too old. (I could upgrade it for free but then many of the programs I use regularly will no longer operate.) Which is why I have a laptop running the latest version of OSX. I downloaded the Arduino software quickly and without hick-up. Double-clicking the Arduino icon launched the program.

I gathered the components I was to use in the first experiment only to discover I was missing a couple of items: a 10 mm LED white bulb and four 2-pin headers which I needed to pin the circuit diagram to the breadboard like a template. Went to the Arduino website but couldn't find the missing pieces, just whole kits. Started searching on the Web. The LED was easy to find but the tiny headers were nowhere to be found. After extensive searching, I came across something called a "Header - 2x23-pin Male (PTH, 0.1")"
After reading about this item, I realized that each link was a 2-pin header and that you simply broke off the number you needed. I ordered this and the LED. 

When I was repackaging the kit to keep it together, I came across a piece I hadn't really noticed before, even though I had been looking directly in each component envelope for the 2-pin headers. It was a bar of 2-Pin Headers! Now I will have two of them.

Before I disconnected the Arduino from the laptop, I ran the software program for the first experiment (making a led blink on and off) and saw that the Arduino board already had an LED fpr pin 13. (The breadboard must reflect what the board itself is doing.) So I uploaded the short program—called a "sketch"—and watched the LED blink. As I used to program in C++, it was easy to see what the sketch (subroutine) did and how it did it. For fun I changed the duration of the blink times from one second on/off to five on/off, compiled the new sketch, uploaded it and watched it work. Very cool.



No comments:

Post a Comment