Close
0%
0%

Arduino Licorice Launcher

Voice Activated, Room Tracking, Catapult Launching, Magazine Reloading, Arduino Licorice Launcher

Similar projects worth following
Voice Activated
Room Tracking
Catapult Launching
Magazine Reloading
Arduino Licorice Launcher

NATO Red Vines Original Standard Issue

Additional notable thanks to @RoboWarner http://robowarner.com/portfolio/radio-homing-robot-diy/ for the RF tracking schematics and code

* * *

A note; yes this should have been a WIFI module how ever I did not have a MKR1000 on premises, thus the Uno and PC connected USB. Should a MKR1000 be made available, it would be altered to suit. In conclusion, pft.

* * *

HUGE shout out to Red Vines who sent this generous swag bag of merchandise. #TeamRedVines

  • 1 × Arduino Uno
  • 4 × High Torque Servo
  • 1 × 1/4" MDF
  • 1 × Wire
  • 4 × 1N4007
  • 1 × Coax Cable
  • 1 × 100K Resistor
  • 2 × 1K Resistor
  • 1 × 10K Resistor
  • 1 × 25 uf Cap

View all 15 components

  • Cuhode!

    VijeMiller09/08/2016 at 18:35 0 comments

    Huge shout out to http://robowarner.com/portfolio/radio-homing-robot-diy/ for his RF tracking system which was adapted in to this needless novelty project. Calibration is 10% software and 90% hardware. Pay specific attention to some of the tips on that page because...actually...actually I wouldn't recommend this method at all. It was a nightmare. A g d nightmare...but good to know.

    // Arduino Licorice Launcher @TVMiller
    // RF Tracking @ Warner K. robowarner.com
    
    #include <EEPROM.h>
    #include <Servo.h>
    
    // Centering
    // Too small adjusts too frequently
    // Too large will pass over signal
    #define buffering 26
    // Output Pin
    #define ANT_WAVEFORM_OUT 8
    // Input Pin
    #define SPEAKER_FROM_WALKIETALKIE A1
    // Calibration Pin
    #define CALIBRATE_IN 11
    
    // Variables
    uint16_t caliset = 0;
    uint16_t voltage = 0;
    int state = 1;
    
    // Servo Assignment
    Servo turn;
    int turnpin = 6;
    Servo loader;
    int loaderpin = 9;
    Servo fire;
    int firepin = 10;
    Servo arm;
    int arm = 11;
    
    // LED Pins
    int red = 3;
    int blue = 4;
    
    void setup() {
    
      analogReference(DEFAULT);
    
      turn.attach(turnpin);
      loader.attach(loaderpin);
      fire.attach(firepin);
      arm.attach(armpin);
    
      pinMode(red, OUTPUT);
      pinMode(blue, OUTPUT);
    
      digitalWrite(red, LOW);
      digitalWrite(blue, LOW);
    
      Serial.begin(9600);
    
      delay(6000); // Allow Power Up
    
      pinMode(ANT_WAVEFORM_OUT, OUTPUT);
      pinMode(SPEAKER_FROM_WALKIETALKIE, INPUT);
      pinMode(CALIBRATE_IN, INPUT);
      digitalWrite(CALIBRATE_IN, HIGH);
    
      // Read EEPROM
      byte HByte =  EEPROM.read(1);
      byte LByte =  EEPROM.read(2);
      caliset = word(HByte, LByte);
      Serial.print("EEPROM Calibration number: ");
      Serial.println(caliset);
    
      // Calibration Check and Delay
      // Aim Receiver and Clear Area
      if (digitalRead(CALIBRATE_IN) == LOW) {
        delay(10000);
      }
    }
    
    void loop() {
    
      if (state == 1) {
        // Engage Licorice Weapon
        digitalWrite(red, HIGH);
        // Trigger Position Open
        fire.write(45);
        delay(1000);
        // Arm Launcher
        arm.write(180);
        delay(1500);
        // Lock Trigger
        fire.write(90);
        // Load Launcher
        loader.write(180);
        delay(330);
        // Stall Position
        loader.write(88);
        // Remove Arm
        arm.write(40);
        // Licorice Launcher is Hot
        digitalWrite(red, LOW);
        digitalWrite(blue, HIGH);
        state = 2;
    
      } else {
        // Hold for Command from JACOB
        if (Serial.available()) {
          char ser = Serial.read();
          switch (ser) {
            case 'L':
              load();
              break;
            case 'F':
              fire();
              break;
          }
        }
      }
    }
    
    void load() {
      // Load Launcher
      loader.write(180);
      delay(330);
      loader.write(88);
    }
    
    void fire() {
    
      // Antenna Switching Waveform
      digitalWrite(ANT_WAVEFORM_OUT, HIGH);
      delay(1);
      digitalWrite(ANT_WAVEFORM_OUT, LOW);
      delay(1);
      digitalWrite(ANT_WAVEFORM_OUT, HIGH);
      delay(1);
      digitalWrite(ANT_WAVEFORM_OUT, LOW);
      delay(1);
      digitalWrite(ANT_WAVEFORM_OUT, HIGH);
      delay(1);
      digitalWrite(ANT_WAVEFORM_OUT, LOW);
      delay(1);
      digitalWrite(ANT_WAVEFORM_OUT, HIGH);
      delay(1);
      digitalWrite(ANT_WAVEFORM_OUT, LOW);
      delay(1);
    
      // Read Speaker Voltage
      voltage = analogRead(SPEAKER_FROM_WALKIETALKIE);
    
      // If in Calibration Mode
      // Store to EEPROM
      if (digitalRead(CALIBRATE_IN) == LOW) {
        caliset = voltage;
        byte HByte = highByte(caliset);
        byte LByte = lowByte(caliset);
        EEPROM.write(1, HByte);
        EEPROM.write(2, LByte);
        delay(5000);
        endprogram();
      }
    
      // Stall Turning
      if (voltage > (caliset - buffering) && voltage < (caliset + buffering)) {
        // Fire
        launch();
      }
      // Turn Left
      if (voltage > (caliset + buffering)) {
        turn.write(180);
        delay(15);
        Serial.print("In, Cal\t");
        Serial.print(voltage);
        Serial.print("\t");
        Serial.println(caliset);
        // Return Cycle
        fire();
      }
      // Turn Right
      if (voltage < (caliset - buffering)) {
        turn.write(0);
        delay(15);
        Serial.print("In, Cal\t");
        Serial.print(voltage);
        Serial.print("\t");
        Serial.println(caliset);
        // Return Cycle
        fire();
      }
    
      delay(5);
      Serial.print("In, Cal\t");
      Serial.print(voltage);
      Serial.print("\t");
      Serial.println(caliset);
    ...
    Read more »

  • Ugly Duckling

    VijeMiller09/07/2016 at 16:38 0 comments

    Note the RF receiver on the rear of the magazine; this will allow for tracking.

    Also, to note, I have a thing for spiraling wires. For those who don't know, take a screw driver, wrap said wire around, give a squeeze and slide it off...and boom, a compact and expandable and vaguely clean looking wire.

  • Geared Your Loin

    VijeMiller09/01/2016 at 16:59 0 comments

  • TVShow Trends

    VijeMiller08/29/2016 at 04:12 0 comments

    Made a quaint little side video while working on this project...


  • Framing

    VijeMiller08/27/2016 at 11:48 0 comments

  • Obligatory

    VijeMiller08/24/2016 at 14:46 0 comments

  • Dummies Guide to CNC (TVMiller's Dumb Method)

    VijeMiller08/22/2016 at 12:05 0 comments

      As a tip for those who are new to CNC-ah-ing, I thought I would show you a step by step of how I have come to simply do it -- in what will be surely said to be the wrong way by those obsessed (arrogant) with their advanced software knowledge -- but yet it works, so scowl because, I am the captain now.

      The desktop CNC build at Makerbar uses a Synthetos Atmel TinyG V8 board.

      1. In a graphics program, I use Adobe Fireworks CS6, open a document using 100 pixel per cm or 100 pixel per in and then create your image to be cut out using black lines. If you want some thing of depth milled out, shallow not through, then make that area transparent. Do not make exterior of the object transparent because you likely want to cut not depth cut. Realize that the cut width of your bit should be taken in to account. I found that on path cutting works best in the following program so I will reduce or increase size by 1/16th of an inch based on half of the 1/8th bit used to cut.
      2. Export the image in PNG
      3. Visit Easel https://www.inventables.com/technologies/easel
      4. Import > Image Trace
      5. Import your image and adjust the settings to make your image clear.
      6. Your object will appear on the flat surface on the left and on the 3D surface on the right. Adjust the dimensions of your 3D surface on the right. Pick a material and ensure the depth of the material matches yours. Also define the bit size. I use a 1/8th bit so in the size I type 0.125 in.
      7. Select all the pieces of your object on the left and resize to the actual dimensions of your original piece. The import never seems to import to actual size.
      8. Now select each individual line of your object and define the type of cut (choose on path...trust me) and select depth of cut and tabs. These tabs prevent the materials from being pulled up when cutting.
      9. Once you have defined all the lines of your object, verify on the right it is what you want as a completed project by hitting Simulate.
      10. Machine > Advanced > Generate GCode
      11. Download GCode
      12. Visit Chilipeppr http://chilipeppr.com/tinyg
      13. Download Serial Port JSON Server
      14. Install and then begin serial-port-json-server.exe. This allows Chilipeppr to speak with your CNC which should be plugged to your computer via USB
      15. Select your CNC in the bottom right.
      16. Now you should be able to control your CNC. You can test this by moving the CNC around on the X Y and Z axis on the upper right.
      17. Drag your downloaded GCode file on to the Chilipeppr work space.
      18. Secure your material on the CNC surface, obviously. Use your head here.
      19. We need to set the machine's zero point (Set Mch Zero) to match where the start point is on the work space. To do this, move the CNC around using the controls above to the point on your material you want as the start point. When close to the material, I typically start the cutting tool and lower the Z axis 0.1 at a time until the first cut can be heard.
      20. Set Mch Zero
      21. Hold on to your butts...
      22. Press the Play Button to load the GCode and begin the cuts.

      Keep in mind, this is the simplest most dullard manner to accomplish this task but for those like me who are disinterested in overly complex software, this works.

      Questions? Comments? Keep them to your self.

  • CNC-ah-ing

    VijeMiller08/20/2016 at 14:35 0 comments

  • CNC vs 3D Printing

    VijeMiller08/17/2016 at 21:59 0 comments

    Leonardo da Vinci, who had no television, would not have the patience for 3D printing. From now on, CNC wood and acrylic, save for minor parts.

    These parts that took days, will be replaced in just a few hours...sigh.

View all 9 project logs

Enjoy this project?

Share

Discussions

David H Haffner Sr wrote 10/01/2016 at 08:17 point

I love Red Vines...and this seems to be the only way to eat them!

  Are you sure? yes | no

Adam Fabio wrote 09/30/2016 at 00:01 point

Hey [TVMiller]!  Arduino Licorice Launcher is a featured project on the Hackaday front page! Congrats!

  Are you sure? yes | no

VijeMiller wrote 09/30/2016 at 01:03 point

Sweet! Get it? Sweet? Because...because candy? Ugh, because candy is often times made from sug--

  Are you sure? yes | no

Dimitris Zervas wrote 09/14/2016 at 11:30 point

I NEED this

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates