Fighting 4 Sanity

    You Dont Have To Be Crazy But It Helps!!!

    Tonight I had some time to add the 2nd shift register. At first I wasnt sure how to pass values to each one. Turns out its as simple a processing another shift out. I also added 2 buttons. The first is a toggle that is used to arm the box. This switch will also function as a kill switch. I have gotten a missile switch cover for the switch. When the cover is closed it will throw the switch back into the off position. The 2nd button is the launch button that will trigger the count down.

    Below is the updated source code.

    #define Buzzer 13
    #define latch 8
    #define clock 12
    #define data 11
    #define armButton 4
    #define launchButton 5
    #define armedIndicator 3
    #define launchIndicator 2
    
    const byte numbers[11] = {0b11000000,0b11111001,0b10100100,0b10110000
    ,0b10011001,0b10010010,0b10000010,0b11111000
    ,0b10000000,0b10011000,0b11111111};
    
    int count = 25;
    int tens = 0;
    int ones = 0;
    boolean launched = false;
    boolean armed = false;
    int iterations = 0;
    
    void setup(){
    pinMode(latch,OUTPUT);
    pinMode(data,OUTPUT);
    pinMode(clock,OUTPUT);
    pinMode(Buzzer,OUTPUT);
    pinMode(armButton,INPUT);
    pinMode(launchButton,INPUT);
    pinMode(armedIndicator,OUTPUT);
    pinMode(launchIndicator,OUTPUT);
    
    Serial.begin(9600);
    
    }
    
    void loop(){
      if(digitalRead(armButton) == HIGH){
        digitalWrite(armedIndicator,LOW);
        if(digitalRead(launchButton) == HIGH){
         launched = true;
        }
      }
      else{
       digitalWrite(armedIndicator,HIGH);
       digitalWrite(launchIndicator,HIGH);
       launched = false;
       tens = getTens(count);
       ones = getOnes(count);
       lightSegments(numbers[tens],numbers[ones]);
      }
    
      if(launched){
        digitalWrite(launchIndicator,LOW);
        tens = getTens(count);
        ones = getOnes(count); 
    
      if(count == -1){
        blinkZero();
        delay(1000);
      }
    
      if(count >= 0){
        lightSegments(numbers[tens], numbers[ones]);
        if(count > 0){
          beep(500,500);
        }
        else{
          beep(1000,1000);
        }
      }
         count--;
     }
    }
    
    void lightSegments(byte tens, byte ones) {
          Serial.print("Set Lights");
          digitalWrite(latch,LOW);
          shiftOut(data,clock,MSBFIRST,tens);
          shiftOut(data,clock,MSBFIRST,ones);
          digitalWrite(latch,HIGH);
    }
    
    void blinkZero(){
      lightSegments(numbers[0], numbers[0]);
      delay(1000);
      lightSegments(numbers[10], numbers[10]);
    }
    
    void beep(int fDelay, int lDelay){
      analogWrite(Buzzer,128);
      delay(fDelay);
      digitalWrite(Buzzer,LOW);
      delay(lDelay);
    }
    
    int getOnes(int count){
      return count % 10;
    }
    
    int getTens(int count){
      return count / 10;
    }
    

    So I finally got around to ordering the remaining parts that I needed for the launch box. I picked up 2 shift registers(out this time), my missle cover for a toggle switch, a big red button for manual launches, and probably starting the count down also, and 2 key locks for doing lock outs, and a peizo buzzer to use during the count down as an audible indicator. I also picked up a 3 position momentary toggle switch which I plan to use for adding or reducing time on the count down. Not being able to wait to put the shift registers in I put the shift register in and rewire the led display

    updated wiring with shift register

    the new code is below:

    #define Buzzer 13
    #define latch 8
    #define clock 12
    #define data 11
    
    const byte numbers[11] = {0b1000000,0b1111001,0b0100100,0b0110000
    ,0b0011001,0b0010010,0b0000010,0b1111000
    ,0b0000000,0b0011000,0b1111111};
    
    int count = 9;
    void setup(){
    pinMode(latch,OUTPUT);
    pinMode(data,OUTPUT);
    pinMode(clock,OUTPUT);
    pinMode(Buzzer,OUTPUT);
    }
    
    void loop(){
    
      if(count == -1){
        blinkZero();
        delay(1000);
      }
    
      if(count >= 0){
        lightSegments(numbers[count]);
        if(count > 0){
          beep(500,500);
        }
        else{
          beep(1500,1500);
        }
        count--;
      }
    }
    
    void lightSegments(byte number) {
          digitalWrite(latch,LOW);
          shiftOut(data,clock,MSBFIRST,number);
          digitalWrite(latch,HIGH);
    }
    
    void blinkZero(){
      digitalWrite(latch,LOW);
      shiftOut(data,clock,MSBFIRST,numbers[0]);
      digitalWrite(latch,HIGH);
      delay(1000);
      digitalWrite(latch,LOW);
      shiftOut(data,clock,MSBFIRST,numbers[10]);
      digitalWrite(latch,HIGH);
    }
    
    void beep(int fDelay, int lDelay){
      analogWrite(Buzzer,128);
      delay(fDelay);
      digitalWrite(Buzzer,LOW);
      delay(lDelay);
    }
    

    On November 1st the National Novel Writing Month begins. I attempted to participate last year and only managed about 20,000 words. I am planning to participate again this year but I am going to be more prepared. This time I actually have an idea of what I want to write about before hand. I have a begining and an end in mind. I have a rough list of characters and a general plot. I am going to jot down some notes over the next 13 days so that come 11/1 I will be ready to hit the door running.

    To get some more details check out the website http://www.nanowrimo.org/

    check out the video.  All I can say is math is a beautiful thing

    I recently started working on a launch box for model rockets.  The final design is a work in progress but I know I want the following:

    1. A count down system that controls the launch.  I want this system to be started and a buzzer to sound with each second of the count down
    2. I would like a key override bypass that allows me to bypass the count down and to launch with the press of a button rather than the count down
    3. The launcher should have a continuity indicator to indicate that the ignitor is properly connected.
    4. The ability to set the count down timer to what every value I desire.
    5. A key lockout for safety.

    I plan to use an arduino as the base for they system though I am not going to dev board.  I plan to pull the chip from the dev board and put it into the system.  I think this will allow me to upgrade the system at a later point with out having to sacrifice my dev board in the process.

    So far I have only done preliminary wiring to the dual 7 segment LED display.  The display was pulled from a scrap board in an old fan.  I wasnt able to find any pin out for the specific model, but I find some pin outs that were close.  Using that as the a guideline I was able to figure out all of the pinouts.  See the image below.

    My preliminary wiring is using 7 of the digital out pins on the arduino board.  I plan to replace this design with an 8 bit shift out register.  I accidently bought a shift in register when I was purchasing components so I cant make that change yet.  Below is a picture of the current connection.

    The last bit I have done is some basic code to run the count down.

    
    #define A 2
    #define B 3
    #define C 4
    #define D 5
    #define E 6
    #define F 7
    #define G 8
    
    const byte numbers[10] = {0b1000000,0b1111001,0b0100100,0b0110000
    ,0b0011001,0b0010010,0b0000010,0b1111000
    ,0b0000000,0b0011000};
    const int segments[7] = {2,3,4,5,6,7,8};
    int count = 9;
    void setup(){
    pinMode(A,OUTPUT);
    pinMode(B,OUTPUT);
    pinMode(C,OUTPUT);
    pinMode(D,OUTPUT);
    pinMode(E,OUTPUT);
    pinMode(F,OUTPUT);
    pinMode(G,OUTPUT);
    }
    
    void loop(){
    
    if(count == -1){
    blinkZero();
    delay(1000);
    }
    
    if(count >= 0){
    lightSegments(numbers[count]);
    count--;
    delay(1000);
    }
    
    }
    
    void lightSegments(byte number) {
    for (int i = 0; i < 7; i++) {
    int bit = bitRead(number, i);
    digitalWrite(segments[i], bit);
    }
    }
    
    void blinkZero(){
    for (int i = 0; i < 7; i++) {
    digitalWrite(segments[i], 1);
    }
    delay(1000);
    for (int i = 0; i < 7; i++) {
    int bit = bitRead(numbers[0], i);
    digitalWrite(segments[i], bit);
    }
    }
    

    Last weekend was Chase’s first camping trip with Boy Scout Troop 603.  This months camping trip was at the Brandywine Hundred Rod and Gun Club for some service hours and shooting sports.  The scouts all met at the gun club at 7pm and setup camp.  The boys spent most of the first night playing zombie tag and got into their sleeping bags near midnight.  The first night wasnt so bad, the weather nice.  At some point around 2am the wind really kicked up and kept me awake for most of the rest of the evening.

    Saturday morning was a little cold but not too bad.  Once the sun got up above the trees it quickly warmed up.  The boys made breakfast in their patrols.  The partrol breakfasts were a wide variety of things from pancakes to eggs and bacon.   The adults had creamed chipped beef on toast.  After breakfast the boys were put to work cleaning up garbage and clearing trails for the gun club.  The boys spent about 3 hours working and found some interesting stuff.  One group of boy found a couple of dear carcasses, another group found the skull of what we believed to be a racoon.  While the boys were working a few of the adults made meatballs and mac&cheese for the boys and the gun club members.

    After lunch the boys were able to shoot at the range.  The boys were split into 2 groups, one group went to shoot the shotguns the other group shot the 22′s.  I spent the day helping on the 22 range with one of the club members and one of the other adult leaders.  All of the boys did a good job following the rang rules, every one was safe and respectful of the firearms.  Once the boys were done shooting the adults had some time to shoot as well.

      That night the boys cooked their own dinners and again spent the night playing zombie tag.  Sunday morning was really cold.  By 8:30am camp was broke and the area had been policed for garbage.  Once parents started showing up en mass Chase and I headed home.  I think Chase had a fun weekend, got to shoot some rifles and shotgun, and really learned what it meant to camp as a Boy Scout.  I know he is looking forward to our backpacking trip in April.  Hopefully I will remember to take some pictures this time.

    This last weekend was Stalingrad VI at Skirmish USA.  As usual Steve, Carlos, and I headed up to the Poconos to play some paintball with the rest of Team Delaware.  We  made last minute hotel plans and headed up late Friday night.  Once we arrived we spent a couple of hour hanging out with the other Team Delaware member then got some sleep before heading to war. 

    In the morning we got a quick breakfast and headed to the field.  The weather was calling for a nice day with temperatures in the low high 40′s to the low 50′s.  When we got there a crisp wind had kicked up and left us doubtful.  We geared up and headed to the field to get chrono’ed and to meet up with Frenchi and Grazi.  Once we were all together it was decided that we were going to make a hardline up the left side of the field to protect the Russian base(Tippman Castle).  This proved to be a futile effort.  We were able to hold them back but it took a lot of paint due to the amount of tree’s and rhododendron. 

    Next we made our way to Dye Castle and Tippman City.  Our job was to push the Germans out of Tippman City.  At that time they had firm control over the city and were pushing on dye castle.  We spread our line and began our push.  The Germans fell back quickly under Team Delawares pushs and we soon had them pushed all the way back into the city.   A few Team Delaware members held the Germans at bay while a larger push was organized on the actual city.   Before the push could be organized a German tank sitting out the city(and behind our front line) was activated.  The tank wreaked havoc on our front line.  Steve secured a grenaded in order to attempt to take out the tank.  Carlos and I took cover near the tank to draw its fire while Steve made a suicide grenade run on the tank.  The grenade hit a tree but still managed to hit the tank(barely).   After the hit Steve called himself out and proceeded to leave the field.  What happened next was unconscionable.  The tank gunner turned his full auto marker on to Steves back.  It was like a scene out of Platoon.  An uncountable number of paintballs began to explode on Steves back causing to fall to his knees in pain.   Needless to say this kind of overshooting is completely unnecessary.  Thankfully the Skirmish staff did the right thing and immediately pulled the tank from the field.  We later counted 30 paintball marks on Steve’s back.

    After a short lunch/gear break we headed back to Tippman City to find that the Russian now controlled the city and were pushing Germans back towards their base.  Again Team Delaware took to the front line to help drive the assault.  We quickly pushed the line a few hundred yards before our support ran out.  Steve, Carlos and myself took our place along the main path leading into Tippaman City, and encourged those around use to keep moving up.   We held the line for about 20 minutes before the Germans made a hard push to recover the ground they had lost.  When the rush started we opened up on the charge dumping paint on them faster than they could move.  The charage was quickly thrown back mostly due to Steve, Carlos and myself.  The three of us found ourself running low on both paint and air and fell back to the city to try to reorganize another push.   Before anything could be organized the Germans had another push on the city which resulted in a couple of players getting into the city.  Carlos made a suicide run, putting himself ahead of the front line and making a huge dent in the rushing force.   At this point we were mostly out of paint and air and had to come off the field to gear up.  Sadly before we could return the Germans had pushed the Russian forces all the way back to Tippman Castle and had control of most of the field.  Carlos managed to get 4 or 5 barrel tap kills, on top of countless other kills. 

    The final score was 49-32 in favor of the Germans.  It was a close game and the Russians nearly pullled off the victory.  I think every one would agree that this is probably the best run event to date.  I dont have any complaints(nor did I hear any)  shooting hot, or reballs as I have experienced and heard in the past.  Even the tank incident was isolated and quickly handled by the event staff.  I personally cant wait for the next event!

    I made my first QSO the other day. KB3DEM and I managed to get on the BEARS net for about an hour once I figured out I had my offset going the wrong way. Had a very nice conversation. It was a lot of fun and I can wait for the next one. I am currently building a yagi to work satellites. I got the 2M elements mounted and the 7cm elements cut. Once I get he 7cm elements mounted I can start wiring up the feed line. I dont think this version is going to be very durable. The material I am using for the elements is a little flimsy. I will honestly be surprised if it works.

    Last week NBC Universal Television and Universal Pictures announced that they have closed a deal to make Steven King’s Dark Tower series into a movie/tv series.  The series is going to be unlike anything attempted before.  Ron Howard is going to launch the series with a movie which will be closely followed by the first TV series.  In total they are planning on making 3 movies and 2 tv seasons spanning all 7 books.  The prospect of getting the epic movie feel followed by the personal character interaction with the tv series is really kind of exciting especially since its going to be the same cast through out all 5 parts of the series.  So in honor of this news I figured I would put together a dream list of actors and actresses that should be cast for this epic endeavour.

    Roland Deschain
    Roland Deschain is the lone surviving Gunslinger of In-World.  He is on a quest to reach the top floor of the Dark Tower and will not let anything stop him from achieving his goal.  Through out the series Roland appears as many ages through he generally and older gentleman.  Because of this I feel there is only one person alive that can play the part of Roland Deschain and represent what it is to be the last Gunslinger.



    Clint Eastwood
    Clint Eastwood is the quintessential bad ass gunslinger.  He has played the gunslinger role in both television(Raw Hide) and in numerous movies.  Maybe its just all the westerns that I have seen him in but he has the right look for the part and I think a lot of people who have read the series have pictured Mr. Eastwood as Roland.




    Jake Chambers
    Jake Chambers is an 11 year old boy who is pulled into Roland’s world after being killed in his world.  While in Mid-World Jake and Roland form a father son relationship which ultimately ends with Jake dying.  Roland later prevents Jakes death in his world which creates a split time line which nearly drives Roland and Jake insane.  Jake is later brought back into Mid-World by a key created by Eddie which allows a door between the two worlds to be opened.  Once Jake is back in Mid-World Roland and Jakes split time lines are merged and the threat of their insanity passes.



    Jake Cherry
    After a lot of thought I think that Jake Cherry from Night at the Museum would make the perfect Jake Chambers.  I always pictured Jake as a nice kid who adapted to his new life. Jake Cherry has the nice kid look and a face that could be as serious as the gunslinger Jake Chambers becomes.  Not to mention i thought he was excellent in Night at the Museum.





    Eddie Dean
    Eddie Dean is a heroine addict turned cocaine trafficer from New York City.  Roland saves Eddie’s life by helping him fight off a bunch of gangsters and pulling him into Mid-World where he eventually becomes a gunslinger.



    Ed Norton
    Eddie was a tough character to place.  He needs to be a druggy and a bad ass gunslinger.  After some thought I think Ed Norton is the perfect guy for the job.  A sterio typicall druggy is think and lanky, a look that Ed portrays in The Hulk and Fight Club.  A gunslinger needs to be bad ass, a little buff, also a look that Ed pulls off in American History X and Fight Club. Eddie’s personality is a little flippant which I think plays to Ed Nortons strengths as well.






    Susannah Dean
    Susannah is an african american woman from the 1960′s.  When introduced she has split personalities as is missing her legs from below her knees.  When she is drawn into Mid-World her personalities are merged into Susannah.  She later becomes Eddie’s wife and becomes pregnant by the demon door while trying to draw Jake into Mid-World.  She is ultimately the only surviving member of Roland’s tet and choose to join eddie and jake in a parrallel world.



    Rutina Wesley
    With out too much thought I think Rutina Wesley would be perfect for Susannah.  She is currently cast as Tara in the HBO series True Blood.  Tara is a trouble individual who at one point is possessed.  Tara can be as sweet as honey and a second later be a hateful vengefull terror.  This is perfect for Susannah who many time through out the series seems to morphy into an evil hateful being.





    OY
    Oy is a Billy Bumbler from Rolands World.  The creature is described many ways through out the book but he basically looks like a cross between a dog, a badger, and a racoon.  He has large gold ringed eyes and gray and black stripped fur.  I always like picturing oy looking more like a corgi but I think he is going to have to be CG.  Oy plays the part of Jakes pet and loyal companion.  In the last book oy dies while saving Rolands life.

    Obviously there are many other roles that need to be figured out, such as Rolands previous tet(Cuthbert, Alain etc).  The which, the voice of Blain the Train.  I am really excited to see how this playes out and I am hopeful that this series will be as epic as the books.

    I just finished upgrading the server from an old school 1GHz processor to a 64bit 2.2GHz processor.  The ram and hard disk space are the same.  not change there.  I also converted the server from linux to windows running Zend server for PHP and MySql.  Since its a windows server I can now work with ms sql and c# both platforms I use extensively at work. Being able to work with these platforms for my other projects will let me explore some stuff outside for work and build some more experience with these tools.

    Going to be starting a new project soon.  Not sure what to call it but its a social wish list.  Basically you create a wish list of things you want say for christmas, or and upcoming birthday.  you get your friends and family to sign up.  When gifts are purchased off the list your friends and family are notified but you dont know which ones have been purchased.  The idea come from trying to organize gift purchases and wish lists for my family.  I have 2 brothers and a sister.  I have 3 children, one of my brothers has 2 children, my sister is engaged, and my other brother is recently married.  its a lot to keep track of when you also factor in mom, dad, grand parents etc.  not to mention the grand parent have other children to purchase for who are outside of the circle that I normally purchase for.  So I am hoping to have the first version done by Christmas this year for a trial run with my family and friends.  We will see how it works out.