Absent For A Bit ....

I am away for a little while working on a few or more episodes for The Adventures of My Space Alien Alter Ego story ... will return (to Earth) soon!

Notice: Blogger has screwed up and lost a bunch of photos out of my blog! They are replaced with a gray silhouette of a human head. I will eventually get them replaced with the correct photo, it may take a while to find and fix everything. So some of my stories don't make much sense without their photos, sorry for the inconvenience.

esbb
Showing posts with label Arduino. Show all posts
Showing posts with label Arduino. Show all posts

2021-08-20

No Country for Old Arduinos

 I was given this task in Facebook:


My response: No Country for Old Arduinos

 

I modified the original opening dialogue for the movie 'No Country for Old Men'


I was main programmer of this company when I was twenty-five years old. Hard to believe. My grandfather was an IT man; father too. Me and him was programmers at the same time; him up in Plano and me out here. I think he's pretty proud of that. I know I was. Some of the old time programmers never even used an IDE. A lotta folks find that hard to believe. Jim Scarborough'd never used one; that's the younger Jim. Gaston Boykins wouldn't use Do Loops up in Comanche County. I always liked to hear about the oldtimers. Never missed a chance to do so. You can't help but compare yourself against the oldtimers. Can't help but wonder how they would have operated these times. 

There was this summer intern I sent to the electrical engineering summer camp at Huntsville here a while back. My recommendation and my testimony. He built a replica of a fourteen-year-old girl. Papers said it was a crime of passion but he told me there wasn't any passion to it. Told me that he'd been planning to build a replicant for about as long as he could remember. Said that if they turned him out he'd do it again. Said he knew he was going to graduate school. "Be there for about fifteen months". I don't know what to make of that. I surely don't. 

The cyber crime you see now, it's hard to even take its measure. It's not that I'm afraid of it. I always knew you had to be willing to disassemble a circuit board to even do this job. But, I don't want to push my chips forward and go out and meet something I don't understand. A man would have to put his job at hazard. He'd have to say, "O.K., I'll be part of this IoT world."


2013-03-28

My Arduino on The Net

I got an Ethernet shield (Arduino talk for "eXpansion card") for my Arduino Uno microcontroller yesterday. 

Today I hooked a temperature probe and LED (light) to the Arduino and played with setting it up as a web server. Yes, that's right, setting it up to deliver content on the Internet and to practice having remote access and control of things. I was able to get a web page that shows the inputs from the Arduino analog channels, and it keeps track of how many times the value randomly exceeds or equals 300 since it was turned on or reset. If a value eXceeds or equals 300 then it momentarily turns bold as weLL.

The temperature probe is tied to analog input 0, so that is why A0 is significantly lower than the others A1-A5 that are just floating with nothing attached.  The web page refreshes automaticaLLy every 50 seconds. In the time I have taken to write this blog post the number analog values eXceeding or equaling 300 has been 21, so it happens occasionaLLy. Again, this doesn't reaLLy mean anything significant, I'm just measuring something that happens occasionaLLy in the real world and reporting it and giving slightly different visualizations during events.

It displays the room temperature in F by default, but if you feed it a message of "esbbC" at the end of my regular URL, it wiLL put up a first line that says "hi esby!" - I used fmcgmccllc's nickname for me (she has the blog Detroit Automotive Meltdown) AND then it displays the temperature in Centigrade. My picture below actuaLLy has "esbbF". The temperature choice of F or C determines whether the LED on my circuit board turns ON or OFF. I tied a picture of a spinning Carbon Nanotube from wikipedia next, then there is a form for entering a first and last name. The form doesn't reaLLy do anything with the names just yet, I am just playing around.

Later this afternoon I tied my Arduino to the Internet by using a DDNS service, so people around the world can see what the temperature is in my living room.

This is the link to my Arduino: http://esbboston.is-a-geek.com 

This picture shows the web app running on my iPad from a different network.


2013-03-26

Arduino Experiment with Apple TV Remote & IR Receiver

I was 95% successful in getting my Arduino Uno microcontroller to read the keypressing of an Apple TV remote control. I say only 95% instead of 100% because it reads all the buttons, but only works reliably from a distance of a couple inches, so not so much "remote", more like only "mote".

I purchased a Radio Shack item 276-0142, a two piece container with an Infra Red Detector and Emitter. I have only played with the detector so far.

I had read about other people doing Arduino experiments with an infrared receiver, but when I got home from the Radio Shack store I discovered that their IR detector had two leads, and while the one in the online example had three. I couldn't find any Arduino plans online for a two lead IR detector so I had to kinda wander through several web sites to get where I am so far with the wiring and design. I did find plenty of user comments at the Radio Shack website about how this particular product was a piece of junk and didn't work at all. So I wasn't hopeful. But I finally made it function. I am not exactly sure if this is an optimal design, so any comments from other people would be welcome.

I got the basic Arduino code from www.instructables.com web site, particularly this one for the detector, and then modified it for interpreting Apple TV remote patterns of information.

http://www.instructables.com/files/orig/FJ8/0ZF4/GVQHPZ4H/FJ80ZF4GVQHPZ4H.pde

This is my wiring diagram


I noticed the pattern for an Apple TV's buttons had a bunch of values near 500-600 microseconds and another bunch around 1600, or about a 1:3 size ratio. These are for the off and on times in microseconds. I noticed there were 32 cycles of data between what appeared to be a much longer start and stop signals.

"usec" stands for microseconds

For the Middle Button of the remote
Received:
OFF ON
0 usec, 6380 usec
8900 usec, 4360 usec
560 usec, 540 usec  
560 usec, 1620 usec
560 usec, 1620 usec 
540 usec, 1620 usec
560 usec, 540 usec
560 usec, 1620 usec
560 usec, 1600 usec
580 usec, 1600 usec
560 usec, 1620 usec
560 usec, 1620 usec
560 usec, 1600 usec
560 usec, 540 usec
560 usec, 540 usec
560 usec, 520 usec
580 usec, 520 usec
560 usec, 1620 usec
560 usec, 1620 usec
560 usec, 540 usec
540 usec, 1620 usec
560 usec, 1620 usec
560 usec, 1620 usec
560 usec, 520 usec
580 usec, 1600 usec
560 usec, 540 usec
560 usec, 1620 usec
560 usec, 1620 usec
540 usec, 1620 usec
560 usec, 1620 usec
560 usec, 1620 usec
560 usec, 1620 usec
540 usec, 1620 usec
560 usec, 1640 usec
560 usec, 31000 usec 

I noticed each button had a common start and ending, but then different in the middle of the data (the 3rd of 4 parts)

Menu Button:   32 560Wave: 1316411168
Play Pause:    32 560Wave: 131641141118
Left:          32 560Wave: 1316413148
Middle Button: 32 560Wave: 131642131118
Right Button:  32 560Wave: 13164458
Top Button:    32 560Wave: 1316431148
Bottom:        32 560Wave: 1316421248  


So I recorded the incoming stream as a pattern of 32 bits of high and low ON, and examined the 8 bits starting with the 17th bit

The Play Pause button pattern 131641141118 translates to a signal pattern of:

    0111011111100001 01111010 11111111 

Example "If statement" (The array is zero based, so the 17th bit is in array pointer 16)

          if (sigpattern[16] == 0 && \
              sigpattern[17] == 1 && \
              sigpattern[18] == 1 && \
              sigpattern[19] == 1 && \
              sigpattern[20] == 1 && \
              sigpattern[21] == 0 && \
              sigpattern[22] == 1 && \
              sigpattern[23] == 0)
              {
               Serial.println("Play Pause Button");
              }

Here is a screen shot from the Arduino - PC serial link showing the results as each button is pushed on the Apple TV remote control while pointed at the top of the IR detector on the Arduino breadboard:


So if someone could help me understand why it only works for a distance of a couple inches I would appreciate it. If I am veRy careful and move the remote perpendicular away from the detector I can get about six inches away, but I have to be veRy careful.

Special thanks to Wally_Z at instructables, see his web site: How To Control Your TV with an Arduino!


2013-03-21

Arduino Experiment for Dog Food Choice

I am testing my dog's ability for abstract reasoning, language, and communication skills.

I made a random light generator with my Arduino microcontroller. When I push a button it randomly sets the light to ON or OFF, and then I use that in an eXperiment with my dog Cooper.

I feed him either deli chicken or turkey mixed in with his dry dog food, and I ask him this meat choice question using my hands as the placeholders for chicken or turkey. I momentarily wiggle each hand with fingers spread apart as I say each word 'Turkey' and 'Chicken'. Random light ON determines Turkey = Right, OFF means Chicken = Right. And then whichever hand he points at first is the meat choice he gets.

I wiLL report back later on the test results (Cooper's choices).







The little blue round switch near the bottom of the red breadboard is a potentiometer that adjusts the contrast of the LCD

The yellow light toggles ON/OFF with each push of the Push Button, but the red light is randomly ON or OFF. The randomness is especially good because the random number generator seed value is generated by a floating Analog Pin input with nothing hooked to it.

I highly recommend NOT getting red colored breadboards. They are very difficult to see the wire connections compared to a white breadboard. The red one just came with the kit.

The Arduino is currently hooked to the PC in these pictures but just for downloading programs. It can be disconnected and powered by batteries or an AC adapter. 

I realize it looks like a jumbled up mess of wires, but the LCD Display takes alot of connections. At least I made the 4 data lines a rainbow pattern of red yellow green blue. I used an old hard drive ribbon cable from a PC to connect the display to the Arduino.

I am having fun !


Left-Right Cooper's Hand Chosen Date AM PM
Random Choice by Cooper
RightTurkeyRight19-MarPM
LeftChickenRight20-MarAM
RightTurkeyRight20-MarPM
RightChickenLeft21-MarPM
RightTurkeyRight26-MarAM
RightTurkeyRight27-MarPM
RightTurkeyRight28-MarAM
LeftChickenRight30-MarPM
LeftChickenRight31-MarAM
RightTurkeyRight31-MarPM
LeftTurkeyLeft02-AprAM
LeftChickenRight04-AprAM
RightTurkeyRight10-AprAM
LeftChickenRight11-AprPM
LeftChickenRight19-AprPM
LeftChickenRight20-AprPM
LeftChickenRight22-AprPM
LeftChickenRight25-AprPM
LeftChickenRight26-AprPM
RightTurkeyRight30-AprPM
RightChickenLeft01-MayAM
RightTurkeyRight04-MayPM
RightChickenLeft07-MayPM
LeftChickenRight08-MayAM
RightChickenLeft13-MayAM
RightChickenLeft14-MayPM

New Blog for My Abstract Art ... Come Visit

Click HERE for the Art of Ernest S B Boston

These are pieces that I have generated mainly using computer art tools. Enjoy !

Something New:

I am also in the process of linking my poetry blog entries together. This project is only partially finished. A "Poetry LINK" at the bottom of the blog entry points to the next older piece of poetry.


First poem in the series of linked poems ....

Turn Gold Out of the Darkness

Turn Gold Out of the Darkness

Blog Archive

My Art

These are some of my abstract art pieces. They are available as prints, send me a note if you are interested.

Couch Glow

Couch Glow

Gold As Smoke

Gold As Smoke

Flowing Wood

Flowing Wood