Sunday, August 21, 2016

Not So Fast, 2016!

So, 2016 thought it could sneak by without a post?  Well, too bad.
My unofficial follower count doubled last month, so I owe them all both something for their flappable support.  Unfortunately, this is it:

I haven't had much time for mackerspacing lately since I decided I wasn't pleased with my old psychological state.  Not sure if I'm completely happy with my new one, but I think it'll do for now.

This seems like a good time to finish one of my unfinished projects... should I complete the Amish Oddyssey game, or the Dartboard?   I flip a coin and the winner is...

Start a new project to unfinish!  I've started salvaging some electronics from the local thrift stores and ordered a crazy multi-servo driver shield from Adafruit that may or may not be the correct tool for the job, but I panicked and ordered it anyway.

I will probably start posting my experiments with servos some time in the next few weeks, months or years.  In your face, 2016.

Sunday, July 19, 2015

Git Moving Day

Hello again.  Today I moved the code from google to github.  Google made it really easy, they gave me an easy button.  All I had to do was create an account on github and then press the easy button.

I also have a different laptop than I was using before, so I installed the git bash software, configured it and cloned the code repository.  Instead of using the .netrc method of storing the credentials like I did last time, I used the credential helper feature of git.  I must have missed it last time around, why didn't you tell me? 

You just need to configure git to use a credential helper, then the first time you try to push to a host, git asks for and saves the credentials.

This post is just a nice place to remember the git stuffs.

Configure global git user info and default to simple pushes:

$ git config --global user.name "{UserName}"
$ git config --global user.email "{Email}"
$ git config --global push.default simple


See available credential helpers, use wincred:
 
$ git help -a | grep credential-*
  credential          merge-recursive     stage
  credential-store    merge-resolve       stash
  credential-wincred  merge-subtree       status

$ git config --global credential.helper wincred


Clone repo from github to local:
 
$ cd git
$ git clone https://github.com/RealNoArms/no-arms-darts.git


Test commits and pushes, one time credentials entry:

$ mkdir Test
$ cd Test
$ vi test.txt
$ cd ..
$ git add Test
$ git commit -m "Testing github configuration"
[master e968e9f] Testing github configuration
 1 file changed, 2 insertions(+)
 create mode 100644 Test/test.txt
$ git push
Username for 'https://github.com': RealNoArms
Password for 'https://RealNoArms@github.com':
Counting objects: 6, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (4/4), 329 bytes | 0 bytes/s, done.
Total 4 (delta 1), reused 0 (delta 0)
To
https://github.com/RealNoArms/no-arms-darts.git
   c4f0097..e968e9f  master -> master
$ cd Test
$ vi test.txt
$ git commit -a -m "Testing github configuration part2"
$ git push
Counting objects: 8, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (4/4), 326 bytes | 0 bytes/s, done.
Total 4 (delta 1), reused 0 (delta 0)
To
https://github.com/RealNoArms/no-arms-darts.git
   e968e9f..644ca58  master -> master
$ cd ..
$ git rm -r Test
rm 'Test/test.txt'
$ git commit -m "Remove github config test files"
[master 3a98162] Remove github config test files
 1 file changed, 3 deletions(-)
 delete mode 100644 Test/test.txt


OK.  Now maybe I'll try to work on the project some more.

Tuesday, March 17, 2015

If My Parents Didn't Pay My Friends To Be My Friends...

Another paid poster revives this blog.

I'll try to blog a little, you know, like a real blogger.  But I'm not fooling anybody, and I really have to go to the bathroom, so this will be brief -- if we're lucky.

Last I checked, which was many months ago,  the damn dartboard worked.  I think I may have renamed it "Dartboarduino" or something clever like that.  I printed out new stickers for it and hung it on the wall and threw a few darts at it a couple of times.

I wrote a lame python script that had a simple menu and played a basic around-the-world-ish game.  It wasn't very cool, but proved that the thing worked.  I was running it on a raspberry pi to a small led tv and I think some of it was just too much graphics for the poor little pi.  I meant to get back to the software, but never did.

I also meant to rewrite the duino sketch to do different things with the LEDs, but never did.

I also meant to somewhat formalize the api/protocol/messaging thingies, but never did.

Instead, I started to write an Atari Adventure parody in pygame called "Amish Oddyssey" (see how I did that "odd" thing with the word "odyssey"? get it? ha?)   It looked like this the last time I worked on it a couple weeks ago:
Eli carries the scythe to the open doors of the red barn.

Eli Enters the Red Barn to find Schwartzentruber, the black angus, guarding the hand-made basket and assertively mooing to express her anxiety, which is a direct result of Eli's proximity to the basket.

Eli searches for the key to the white barn in the corn maze.

Eli captures the hand-made quilt from under the nose of Yoder, the seemingly disinterested purple hereford.
I thought, "I'll just finish this game real quick-like and then rewrite the dartboard game and then build my theremin and then write my novel and then direct my movie and then move on with my life."

I also recently received a top secret message from google saying that google code hosting is ceasing to be, and I will need to move my code somewhere else, like github.  Which I will do and I will tell all of you paid posters all about it in a new post, and then in 9 months you can comment here with something like, "This is great.  Keep up the great work.  How great is it? Great." and then you can do the same for the 6000 other blogs with no recent activity.

I'll also put my updated python code on github... and probably the code for this Amish Oddyssey travesty (the cows really "moo," so I have that going for me).

Must. Pee. Now.


Tuesday, July 8, 2014

Re-V

Just a quick note to myself to say that I re-completed the hardware... transplanted the contact sheet from another board without major incidents.  I really fried the perfboard where the 20-pin ribbon connector attached...through desoldering the old and resoldering the new.... and I broke the ends of a couple wires from the shift registers bending them into place, switching a couple of the wires in the process... but a quick edit to the duino sketch put everything back in order.

Another "doh!" here.... I had no experience with these ribbon connectors, so I was afraid to mess with them too much.  After I desoldered the old one from my perfboard circuit and while moving the new one from the other board, I realized that the ribbons slide in and out of the connectors quite easily. The big DOH! was that I could have simple left the 20-pin connector from the other board and just switched out the ribbons much more quickly, easily and without the heightened danger of screwing up what was working.

Despite that big miss, I removed the ribbons while I was soldering the connector to the board, so I wouldn't melt the new contact sheets in the process.  I also applied a little hot glue to the connector to hold it in place while upside down when soldering, which made it easier and may have been necessary since I desoldered most of the solder pads along with the solder, so I couldn't really solder the pins securely in place by solder alone.

Oh, almost forgot... I also used the speaker from the new board, which is much smaller than the other.  Instead of soldering the connecting wires, I twisted and taped them.  I also taped the speaker itself into the cavity since it is too small to be held into place by the screws for the factory speaker.

Whatever I did and however I did it, it worked well enough - at least for now.  The board passed regression testing with my serial test python script and then passed some spot-checked dart hits after closing everything up in the case.

I put some black electrical tape around the button holes out of which the LEDs emerge.  This looks a little cleaner and hopefully will protect the perf board from some dust and maybe any stray darts --- although I'd like to find something else to cover the LEDs for dart protection.  I also printed some small labels for the LEDs and a big label for the big window in the middle.  I might revisit these for aesthetic reasons -- I was happy just to get them almost lined up on the label sheets using Open Office Writer.

I hung the thing on my wall with a couple screws and started another test python script using some pygame menu code I found.  I checked it all in to git and am updating the pi as I type so I will port it over and take it for a test run.  Maybe I'll try to make a vid and start a dumb you tube channel as a companion to my dumb blog.

I have some more pics to post here and I still need to update the circuit diagrams to reflect the current circuit and duino sketch.  But, hey, I REALLY finished the hardware... something I wasn't sure I could pull off.  I know I can handle the software, so "Woo Hoo."

Sunday, June 29, 2014

File Under: Lessons Learned the Hard Way

Wowzers.  3 posts in one day, 4 in two... you know the shnizzit must be gettins realziz.

Everything was working just swell shortly after the last post - I soldered some wires for the speaker to the perfboard, and hand-twisted these around the wires attached to the dartboard's speaker. I screwed the perfboard to the mounts in the frame, connected the USB and ran my enhanced python test app (will upload to git shortly and link here, for all you monster fan boys out there).  It was working perfectly - the speaker spake, the hits were registering flawlessly, the LEDs were LEDing all over the place like the mad beasts that they are.

And then...

I untwisted the speaker wires and attempted to solder the ones from the perfboard to the speaker itself.  I think the existing speaker wires were attached with silver play-doh - or at least that's how it acted.  It sloshed around like some pseudo-plasmatic vomit and only succeeded in frustrating your humble narrator.  It was at this point that it was me against the speaker... mano y speako... except mano ceased to consider the hot soldering iron in his hand to be of primary importance.

Eventually, the wires were attached to the speaker with some fresh, solderesque solder and victory was declared once more.

And then...

The dartboard was again connected to the laptop and the tests were run again and tests began to fail.  Notably, the speaker didn't work. "C'mon!  Really!  Really? After all that?!" are words that approximate the feelings.  The triple ring, double ring and single wedges appeared to work from some quick tests - tests that were assumed to work since nothing really changed except for the speaker wires... but when I tried to hit a double bull to quit my testing...

(nothing)

Single bull - fine.
Double bull - nothing.
All numbers except 9 and 14 - fine.
9 and 14 - nothing.
Double bull, 9 and 14 all happen to share the same wire... row 3 in the matrix (in the code)... pin 1 of the first 595 shift register... pin "11" (first pin of the second row) of the 20-pin ribbon connector... nothing.

I resoldered pin 1 at the first 595. I resoldered pin 11 at the ribbon connector.  I checked continuity.  Everything appeared to be adequate.  But my blurry eyes noticed, as I flipped the plastic sheets over to try another retest, that there was a cookie monster bite out of one of the plastic layers.  Closer examination revealed that it was probably melted by a soldering iron and that it took a complete chunk out of only the outer most conductive trace on that side.  Following the broken trace back to the ribbon and 20-pin connector, it led to the 11th pin... following it the other way, it led to 9/14/double bull.

"C'mon!  Really!  Really? After all that?! REALLY?!?! AFTER ALL THAT?!?!" ... or something like that.

I tried to bridge the gap with electrical tape and a small piece of wire, but it would not budge a metric inch.  My thoughts once again started to frantically consider other hobbies.  Scrapbooking sounds, well, completely awful (to me --  I'm sure it's spiritually, intellectually and artistically fulfilling for tons of people, but my fraction of a ton simply does not contribute to that total).

Then I remembered that I have an electronic dartboard on deck, and yet another in the hole.  The first was within arms reach during this crisis, so I quickly had the back cover removed and the wires violently separated from the dartboard factory's obviously inferior brainboard.

My perfboard would not even come close to fitting in this new frame, but the sheets looked like a match - they actually look a little better-made.  The patterns on both sides are essentially the same, but the layout looks a little better, nicer, cleaner, safer... can't explain it very well at the moment, but I'll take a polaroid of it and post it so you can see what I mean.

The ribbon connector is also essentially the same, but instead of one 20-pin connector, there are 2 ten pin connectors...10 wires on one side and 7 on the other - same deal.  I desoldered these chumps, easily needle-nosed away the glue that tried to hold them down more permanently, and this factory board was tossed on the bones of the other one.

When my gumption levels are sufficient, I will desolder the old ribbon connector from my circuit and solder in the new guy.  I might use the new dartboard's speaker as well, if it accepts my solder more readily than the other bastard.

Yeah.  A lesson was learned today.  If the project frustrates you, put down the soldering iron and step away from the electronics.  Count to 10 in a numbering system other than base 10, preferably octal and then hexadecimal... and then nobody gets hurt -- not you, not your self esteem, not your project.  And, nobody gets forced into scrapbooking.

V

Pulled out the old multimeter and tested the 18/19 connection and the red LED connection for continuity.

The ground wire from the red LED to the yellow LED was no longer attached at the yellow LED, meaning the red LED was not grounded.  So I soldered it back... the wire is a little too short, so this might happen again... these ground wires were pretty much the first connections I soldered, so it is no surprise that I screwed one of them up.

No problems with the path from the shift register to the ribbon connector for the 18/19 wedges, so I just heated up the joint and added an itty bit of solder.

Plugged the sucker back in and both the light and the 18/19 wedges worked.  Ran through a successful test of all wedges (just the single, not bull or double/triple, so i could be in for an unpleasant surprise later).

Everything appears to be working correctly, so I will just connect the speaker wires and screw the perfboard into place.  Methinks I will re-drill a few of the mounting holes since I had to bend the board a little to fit on the mounting posts and I cannot imagine bending it is helpful to the quality soldering job.

Another worry is the ribbon connector looks to be connected a little too close to the dart board, cause it is sort of looping up and may create a situation with the ribbon, the near-edge of the contact sheets and/or the cover -- in other words, there is a little too much slack in the ribbon so it protrudes up too high and to flatten it out results in the contact sheet lifting up from the plastic wedges a little.  We'll just have to wait and see what happens here, it may just work itself out and be happy,

Anyway, the gist is, yeah, victory, yay team.  I know it works and if it doesn't stand up to the abuse for which it is destined, I only have to repair and tweak.

Fixing A Hole Where The Rain Gets In And Stops My Mind From Wandering, Where It Will Go

Did some testing and troubleshooting and fixing today.  The results are encouraging.

I updated my sketch to output the row and column when a hit is detected, and I found out a few interesting things about the issues I reported to myself yesterday.

Firstly, only the red "Server Connection" LED is not working.  The yellow and green light up as instructed when a connection is established.

Secondly, all the number wedges were registering hits today, only the second half of the triple ring was not.

So I charted out all the row/column pairs for each hit combination and updated my matrices in the sketch to match.  A retest found that all hits were registering correctly, except: the second triple ring remains silent and the 18/19 pair stopped registering.

Glancing at the perfboard and ribbon connector, I quickly found the problem with the triple ring... the 7 outputs from the dartboard start on the second pin.  I connected the shift register to pins 1-7 when I should have connected them to pins 2-8.  An easy fix, I will just solder in another small wire connecting pin 1 to pin 8... this also explains why the single/double/triple/bull portion of the matrix was off by 1 in every case. Doh!

The 18/19 pair of wedges may be a precarious solder.  It is the first pin in the second row of the ribbon connectors, and I was flipping the perfboard over and back to inspect the connections, so it is possible that I have been disturbing this joint in the process.  I will de- and resolder this connection, and inspect the other end of the connection at the shift register to see if that may be where the problem actually lies.  I can imagine some of these connections breaking when the board is actively pummeled by darts, so I will be sure to generate the proper documentation that details what shift register pins goes to which dartboard ribbon pin, and what row/column and point/multiplier these match -- if one stops registering, I will be able to find the solder joints quickly and easily.

Finally, I will test the connections to the red server connectivity LED and test the LED itself to see why it is not functioning properly.  To be honest, I will consider this project a success even if this one LED doesn't work, so put that in your pipe and don't smoke it because smoking is a health risk.

On another front, I downloaded some free circuit board design cad software and created the dartboard circuit.  It is a mess.  I need to seriously reconsider the layout to optimize the traces because there is so much crossover in this layout.  The circuit has some layout restrictions due to the location of the LEDs, the location of the ribbon connector and to some extent the orientation of the boarduino.  Unfortunately the software I am using does not appear to have an option to automatically route the copper or optimize the layout.  Also unfortunate is that the other free software that does have this option also has restrictions on the board size -which my circuit exceeds.

I will keep looking for other softwares and maybe try to defeat the limitations by trying to export from one into another.  Fear ye not, I will surely keep all of you updated on this topic, so there is no need to flood the comments section nor my inbox with all of your complaints.  Gee whiz.