Search This Blog

Yesteryear

Tuesday, January 25, 2011

January 25, 2011


           The Tat is spending more and more time back home. She comes out to meet me like the old days. Today is a long-winded detailing of computers, electronics and robots. Skip it if you want people news; otherwise settle back for the ride. I’ll explain why I have so much time on my hands today and will not mention that driving the scooter has brought back minor heart problems if I drive on the main roads, which cannot be entirely avoided because the freeways in Florida go right through town. Actually, it is the other way around. The towns cluster along the freeways.
           I’ve got the electric bike back here and a lot more information. No matter what I do with the bicycle now, the $40 was very well spent in results. For some reason, the producer of this elegant and compact electric kit (it is an after-market conversion) remains a bit of a mystery. I’ve analyzed the unit and understand how everything works. I met some people at New Age Cycles (corner of 19th and Harrison)who were beyond helpful.
           Sadly, their lowest price of $399 is still out of my range. Like most resellers, they have some parts such as batteries and recharges, but these priced together cost far more than the assembled product. This seems to be a trait of all transportation shops. If I eventually take that long bicycle trip, they have stated they will act as sponsor and festoon my rig with logos. I told them I cannot leave until I figure out how to recharge the batteries on the road. Otherwise, daily range is in the 40 mile stretch where my least average has to be around 185 miles, a lot of pedaling.

           Here it is only Tuesday and I’m already flat broke. Had to buy gas, lamp oil, nylon ties, a newspaper, coffee, it adds up pretty quick. That means today I get to read up on serial interfaces. I know what they are, but I mean how to program them with the Arduino. I have seen youTube videos of the Arduino reading serial input from a variety of sensors, but have no idea (yet) how to get the computer to store that data rather than merely display it.
           This is before your time, but as a lad I experimented with AI back when it was called “Artificial Intelligence”. That was in 1980, when 99.999% of you had never touched a computer or ever thought you would. It is the opposite of AI how some people I know who first checked their e-mail less than five years back will try to tell me how things work!
           I had one of the first pirated Apple clones; RofR sent it to me from Taiwan. We labeled it “typewriter parts” correctly figuring no customs agent would ever admit he didn’t know it all. I spent countless hours with this device, including visiting the dozens of boring bulletin boards in the Seattle area. Yes, folks, that was ten years before the Internet you are thinking of. And there was already a hooker on line back then.
           You can read the scope of my experiments by going back to August 4, 2008 in this blog. The point is I had found two distinct modes of AI. One is the obvious code that acts on information supplied by sensors. The less noticeable was how instead of acting only on the external data, I had the “bug” store data from previous events and base future decisions on what its memory showed had worked best before. Do go back and read it, for without being specifically instructed to do so, the “bug” quickly trained itself to kill.

           Back already? Okay, to add to the mystery, an accidental coding error in 1981 left a small gap in the 8 pixel frame. I thought nothing of it until the “bug” found it and disappeared off my computer screen. In around two minutes, it somehow began to “eat” parts of my computer memory and the system crashed. I had discovered what is now called a virus, but shelved it as a useless and dangerous failure. Isn’t that something?
           [Author’s note: there was the predecessor of this blog in pencil writing back then, I believe I documented these experiments. One day I will begin the laborious task of converting that vast amount of material to digital. But don’t expect too much, as most everything new was hand-coded. I often spent two weeks programming to get five seconds of running results. The one part I could brag about is back then I was already an accurate speed typist and did not have to spend much time debugging typos. But I won’t.]
           Fast forward to today. When I watch the kid’s robots battle it out I can see they are operating mainly on “mechanical” code. This makes sense, because you only see the kids building the robot parts, never actually designing the code, although I’ve seen them manipulate it. My thinking races ahead to the memory part, where in addition to active commands, the robot looks back into memory and determines each probability of success before blindly following the command. This is more than dreaming, for I did it once over thirty years ago and can do it again. Then I got a job with the phone company and everything came to a standstill for the next decade and a half.
           I’ve discovered the Arduino compiler is finicky. If you get a compiling error, make sure you go back and try it several times before going looking for bugs. Avoid doing anything else with the computer while the compile is underway. As usual, the error message is cryptic but did narrow things down to a loop with an error in either line 48 or 49 as shown here. The line numbers, however, are not displayed on screen, so you still have to guess the location.
           Come back in eight hours, after I’ve spent the day learning about serial interfaces. Why do I have a sudden craving for a bowl of corn flakes?
           Ah, you are back after only five hours. That’s good, it is almost noon and I’ve got information overload. Refer to the Minutes blog, experiment 008, to see what I did since this morning. The only sensors I have just now are photoresistors, so I used my computer keyboard as the input device. It kept things on a plane I could interpret because I remember the ASCII value of the letter A is 065.
           I also discovered how to use the Arduino analog inputs to supply power to the board and that a 9V battery has 400mW hours of juice. That means a fresh cell will power the 40mW Arduino board for around ten hours. Which is pretty lousy performance if you ask me.

ADDENDUM
           Later, I spent three hours at the library, about all I can afford to do these days. I was unable to discover any method of saving the stream of values that Arduino can read from a sensor. At this point I know it will be difficult to find out and whereas the Uno model IDE will display in a separate window all the values read from the brainboard, it cannot be copied. This is not a trivial problem in my mode of thinking.
           Cheerily, it is just possible my new “Minutes” blog may be unique. America is a big and heavy populated place so we’ll give it a while. I was lucky enough to find that nobody had scooped veryatlantic and tried to sell it back to me. As positive reinforcement, Mark from Hacktronics e-mailed to say my documentation was a good thing, indicating it may also be the first of its sort. We shall see. On the other hand, the Radio Shack crowd has become decidedly disinterested after just a few weeks.
           Then, try as I might, I was unable to get a variable sensor to send a stream of values to the serial monitor, but I’m on the right track because it is sensing something. It is after 11:00 PM, time for shut eye.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Return Home
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++