Propelling a Ping Pong Ball 17 feet

We are doing a project where we have to consistently shoot a ping pong ball 17 feet into a pail. Any suggestions or ideas?

Topic by dylanwil   |  last reply


How can I change the pitch of a buzzer using a PING))) sensor?

 I am trying to make it so that when I move my hand closer to the PING sensor, the pitch of the buzzer becomes higher.  I don't care about the distances or pitches because I can edit, I just can't write codes. Thank You

Question by macattackct   |  last reply


Team Fortress 2 ping

Hi, I have recently received high ping on all servers in TF2, while other people get around 20, i get 220 ping. What is wrong with my internet and how do i fix my ping?

Topic by NXTHacker   |  last reply


connecting new ping to arduino. Answered

Hi, I got ping from amazon but it has 4 leads and I do not know how to connect it to the arduino. The leads say vcc, trig, echo, and gnd. Will I be able to use the examples with ping on my arduino?  http://www.amazon.com/gp/product/B004U8TOE6/ref=oh_details_o00_s00_i00

Question by jbaker22   |  last reply


Wireless Ping Pong Scoreboard

I want to make a scoreboard for our ping pong table. I currently have a "prototype" loaded on my arduino. It consists of an LED matrix and two momentary button switches. One button adds a point, one button subtracts a point (just in case) and displays the current score on the LED matrix. The plan is to add another LED matrix and two more push buttons, so that each player will have the buttons mounted on their side of the table, to keep their own score, with the LED matrix mounted on the wall. My question is, does anyone know anyway to make the buttons connect to the arduino wirelessly so I don't have to run a ton of wire? I also currently have implemented debouncing on the input buttons and would like to keep that to ensure that when you add or subtract one point, it really is only one point.Thanks!

Question by texpert 


How can I make this buzzer buzz? It makes a small "ping" Answered

I got this buzzer from a surplus shop and I hooked up wires but only makes a small ping when I touch the wires to a battery terminal, How can I make it buzz?

Question by fusorx   |  last reply


Hey everyone. Can I use this to make something like a ping ultrasonic sensor except for ir? Answered

Hey everyone. Can I use this to make something like a ping ultrasonic sensor except for ir? Or somehing like this.

Question by TOCO   |  last reply


My PING sensor works only in one direction when the ping sensor is rotated to complete right direction . . . . having trouble in code :/ plz guide me for the code thanQ :)

// here is the code  // problem facing with the HEAD servo and the PING sensor  // this is paning from left to right but the problem is that PING works only in 1 direction. #define trigPin 3 #define echoPin 12 #define led 4 #define relay 8 Servo sl; Servo head; Servo sr; Servo el;   Servo er; int posh=0; int posl=0; int posr=0; void setup() {   sl.attach(9);   sr.attach(10);   el.attach(11);   er.attach(5);   head.attach(6);   Serial.begin (9600);   pinMode(trigPin, OUTPUT);    pinMode(relay, OUTPUT);   pinMode(echoPin, INPUT);   pinMode(led, OUTPUT); } void loop() {     for(posh = 0;posh <= 180; posh +=1)   {  delay(15);     head.write(posh);   }      for(posh = 180;posh >=0; posh -=1)   {       head.write(posh); delay(15);  }           //shoulder up   long duration, distance;   digitalWrite(trigPin, LOW);  // Added this line   delayMicroseconds(2); // Added this line   digitalWrite(trigPin, HIGH); //  delayMicroseconds(1000); - Removed this line   delayMicroseconds(10); // Added this line   digitalWrite(trigPin, LOW);   duration = pulseIn(echoPin, HIGH);   distance = (duration/2) / 29.1; if (distance < .1) {  // This is where the LED On/Off happens      digitalWrite(led,HIGH); // When the Red condition is met, the Green LED should turn off      Serial.println("WELCOME");    head.write(90);       for(posl = 0, posr = 180; posl <= 90 ; posl +=1)   {       sl.write(posl);      sr.write(posr);      posr -=1;     delay(15);   }           // elbow close      for(posr = 0,posl=180; posr <= 45; posr +=1)   {     er.write(posr);     el.write(posl);     posl -=1;     delay(15);   }     delay(3000);   //elbow open       for(posr = 45,posl=135; posr >= 0; posr -=1)   {     er.write(posr);     el.write(posl);     posl +=1;     delay(15);   }     //shoulder down       for(posr = 90,posl= 90; posr <= 180; posr +=1)   {     sr.write(posr);     sl.write(posl);     posl -=1;     delay(15);   }      digitalWrite(relay,HIGH);    delay(1000);     digitalWrite(relay,LOW);   }     else   {     digitalWrite(led,LOW);   }     delay(100);     }

Topic by speak2sainow   |  last reply


Need help for improving PING Ultrasonic sensor code to make it precise

Hi guys,               I havebuilt a circuit to detect the swinging of an object using ultrasonic sensor and send signals to the Arduino Duemilanove board which in turn activates the solenoid. The circuit is working fine but I'm using a PING Ultrasonic sensor and I'm having hard time controlling it with the code. Do you have any idea about how to control and make the readings precise for the Sensor? If you want, I can post my code here... Any help is appreciated. Thanks in advance!

Topic by kailash174   |  last reply


I need help with arduino code. Can someone help me remove the ping sensor from the code below?

I need to take the ping sensor out of this code. I want the robot to drive around like crazy until it bumps into something with the bump switch. /* Rumblebot Driving with object avoidance utiliszing PING Ultrasound Sensor * and a bump switch. * Reads values (00014-01199) from an ultrasound sensor (Parallax PING) * * Version 1.1.2 Motor runs and drives full time unless object detected. *-------------------------------------------------------------------- * * * * * * */ int switchPin= 2; // Right bump switch on pin 2 int swval; // Variable for reading switch status int ultraSoundSignal = 7; // Ultrasound signal pin int val = 0; int ultrasoundValue = 0; int timecount = 0; // Echo counter int ledPin = 13; // LED connected to digital pin 13 int motorpinright = 10; // pin for left motor reverse int motorpinleft = 11; // pin for left motor forward int motorpinrevright = 5; // pin for right motor reverse int motorpinrevleft = 6; // pin for right motor forward void setup() { pinMode(switchPin, INPUT); // Sets the digital pin as input pinMode(ledPin, OUTPUT); // Sets the digital pin as output pinMode(motorpinright, OUTPUT); // Motor drives----------- pinMode(motorpinleft, OUTPUT); //------------------------ pinMode(motorpinrevright, OUTPUT); //------------------------ pinMode(motorpinrevleft, OUTPUT); //------------------------ } void loop() { /* Start Scan * -------------------------------------------------- */{ timecount = 0; val = 0; pinMode(ultraSoundSignal, OUTPUT); // Switch signalpin to output /* Send low-high-low pulse to activate the trigger pulse of the sensor * ------------------------------------------------------------------- */ digitalWrite(ultraSoundSignal, LOW); // Send low pulse delayMicroseconds(2); // Wait for 2 microseconds digitalWrite(ultraSoundSignal, HIGH); // Send high pulse delayMicroseconds(5); // Wait for 5 microseconds digitalWrite(ultraSoundSignal, LOW); // Holdoff /* Listening for echo pulse * ------------------------------------------------------------------- */ pinMode(ultraSoundSignal, INPUT); // Switch signalpin to input val = digitalRead(ultraSoundSignal); // Append signal value to val while(val == LOW) { // Loop until pin reads a high value val = digitalRead(ultraSoundSignal); } while(val == HIGH) { // Loop until pin reads a high value val = digitalRead(ultraSoundSignal); timecount = timecount +1; // Count echo pulse time } /* Lite up LED if any value is passed by the echo pulse * ------------------------------------------------------------------- */ if(timecount > 0){ digitalWrite(ledPin, HIGH); delay(50); //LED on for 50 microseconds digitalWrite(ledPin, LOW); } /* Delay of program * ------------------------------------------------------------------- */ delay(100); } /* Action based on data * ------------------------------------------------------------------- */ { ultrasoundValue = timecount; // Append echo pulse time to ultrasoundValue } if (ultrasoundValue > 800) { /* Drive straight forward *----------------------------------------------- */ analogWrite(motorpinleft, 255); //100% speed analogWrite(motorpinright, 255); //100% speed0 } /*------------------------------------------------ */ else /* Turn hard right *--------------------------------------------- */ { analogWrite(motorpinleft, 0); //stop left motor analogWrite(motorpinright, 0); //stop right motor analogWrite(motorpinrevright, 0); // stop right rev motor analogWrite(motorpinrevleft, 0); // stop left rev motor analogWrite(motorpinrevright, 255); //100% speed analogWrite(motorpinleft, 255); //100% speed delay(380); //380 milliseconds analogWrite(motorpinrevright, 0); // off analogWrite(motorpinleft, 0); // off /*---------------------------------------------- */ } /* Backup and turn right when switch gets bumped and closes circuit to ground *--------------------------------------------------- */ /* */ digitalWrite(switchPin, HIGH); // Sets the pin to high swval = digitalRead(switchPin); // Read input value and store it if (swval == LOW) { analogWrite(motorpinleft, 0); //stop left motor analogWrite(motorpinright, 0); //stop right motor analogWrite(motorpinrevleft, 0); // stop left rev motor analogWrite(motorpinrevright, 0); // stop right rev motor analogWrite(motorpinrevleft, 255); //100% speed analogWrite(motorpinrevright, 255); //100% speed delay(800); //800 milliseconds analogWrite(motorpinrevleft, 0); // off analogWrite(motorpinrevright, 0); // off analogWrite(motorpinrevright, 255); //100% reverse speed analogWrite(motorpinleft, 255); //100% forward speed delay(700); //700 milliseconds analogWrite(motorpinrevright, 0); // off analogWrite(motorpinleft, 0); // off delay(50); //50 milliseconds } /*------------------------------------------------ */ } UPDATE I tried deleting some stuff and changing some stuff. When I turn on the robot noting happens. Here is the code after the changes. * Rumblebot Driving with object avoidance utiliszing PING Ultrasound Sensor * and a bump switch. * Reads values (00014-01199) from an ultrasound sensor (Parallax PING) * * Version 1.1.2 Motor runs and drives full time unless object detected. *-------------------------------------------------------------------- * * * * * * */ int switchPin= 2; // Right bump switch on pin 2 int swval; // Variable for reading switch status int ultraSoundSignal = 7; // Ultrasound signal pin int val = 0; int ultrasoundValue = 0; int timecount = 0; // Echo counter int ledPin = 13; // LED connected to digital pin 13 int motorpinright = 10; // pin for left motor reverse int motorpinleft = 11; // pin for left motor forward int motorpinrevright = 5; // pin for right motor reverse int motorpinrevleft = 6; // pin for right motor forward void setup() { pinMode(switchPin, INPUT); // Sets the digital pin as input pinMode(ledPin, OUTPUT); // Sets the digital pin as output pinMode(motorpinright, OUTPUT); // Motor drives----------- pinMode(motorpinleft, OUTPUT); //------------------------ pinMode(motorpinrevright, OUTPUT); //------------------------ pinMode(motorpinrevleft, OUTPUT); //------------------------ } void loop() { /* Start Scan * -------------------------------------------------- */{ timecount = 0; val = 0; pinMode(ultraSoundSignal, OUTPUT); // Switch signalpin to output /* Send low-high-low pulse to activate the trigger pulse of the sensor /* Delay of program * ------------------------------------------------------------------- */ delay(100); } /* Action based on data * ------------------------------------------------------------------- */ { ultrasoundValue = timecount; // Append echo pulse time to ultrasoundValue } if (true) { /* Drive straight forward *----------------------------------------------- */ analogWrite(motorpinleft, 255); //100% speed analogWrite(motorpinright, 255); //100% speed0 } /*------------------------------------------------ */ else /* Turn hard right *--------------------------------------------- */ { analogWrite(motorpinleft, 0); //stop left motor analogWrite(motorpinright, 0); //stop right motor analogWrite(motorpinrevright, 0); // stop right rev motor analogWrite(motorpinrevleft, 0); // stop left rev motor analogWrite(motorpinrevright, 255); //100% speed analogWrite(motorpinleft, 255); //100% speed delay(380); //380 milliseconds analogWrite(motorpinrevright, 0); // off analogWrite(motorpinleft, 0); // off /*---------------------------------------------- */ } /* Backup and turn right when switch gets bumped and closes circuit to ground *--------------------------------------------------- */ /* */ digitalWrite(switchPin, HIGH); // Sets the pin to high swval = digitalRead(switchPin); // Read input value and store it if (swval == LOW) { analogWrite(motorpinleft, 0); //stop left motor analogWrite(motorpinright, 0); //stop right motor analogWrite(motorpinrevleft, 0); // stop left rev motor analogWrite(motorpinrevright, 0); // stop right rev motor analogWrite(motorpinrevleft, 255); //100% speed analogWrite(motorpinrevright, 255); //100% speed delay(800); //800 milliseconds analogWrite(motorpinrevleft, 0); // off analogWrite(motorpinrevright, 0); // off analogWrite(motorpinrevright, 255); //100% reverse speed analogWrite(motorpinleft, 255); //100% forward speed delay(700); //700 milliseconds analogWrite(motorpinrevright, 0); // off analogWrite(motorpinleft, 0); // off delay(50); //50 milliseconds } /*------------------------------------------------ */ }

Question by TOCO   |  last reply


Need DIY Nerf-type weapons for Christmas - Ideas??

Our Christmas tradition starts at about 10 am with a rowdy war of some sort. Unfortunately, the Nerf company can't make an unbreakable item for overgrown boys. This year, we're going with DIY weaponry. The Marshmallow shooter is too tame, and the rubber band gun is too harsh. What other options are out there? 

Topic by Very Interesting   |  last reply


Batch Code variables?

So, I have been making a "OS" in Batch recently, and i am working on the main menu. it all works fine on the first variable, but when i type in anything else, (anything on the keyboard) it comes up with just the first variable. Anyone got any ideas for fixes? here's the code: ========================= @echo off :MMlauncher title Main_Menu echo Welcome to DolphOS! echo What would you like to do? echo. echo 1 File Explorer echo 2 Games echo 3 Notepad echo 4 Clock echo 5 Close DolphOS set /p programs=Enter number here: if%programs%==1 goto FeLauncher if%programs%==2 goto GMSLauncher if%programs%==3 goto NtpdLauncher if%programs%==4 goto ClkLauncher if%programs%==5 goto ShtDwn :FeLauncher echo l ping localhost -n .15 >nul cls echo la ping localhost -n .15 >nul cls echo lau ping localhost -n .15 >nul cls echo laun ping localhost -n .15 >nul cls echo launc ping localhost -n .15 >nul cls echo launch ping localhost -n .15 >nul cls echo launchi ping localhost -n .15 >nul cls echo launchin ping localhost -n .15 >nul cls echo launching ping localhost -n .15 >nul cls echo launching ping localhost -n .15 >nul cls echo launching F ping localhost -n .15 >nul cls echo launching Fi ping localhost -n .15 >nul cls echo launching Fil ping localhost -n .15 >nul cls echo launching File ping localhost -n .15 >nul cls echo launching File ping localhost -n .15 >nul cls echo launching File e ping localhost -n .15 >nul cls echo launching File ex ping localhost -n .15 >nul cls echo launching File exp ping localhost -n .15 >nul cls echo launching File expl ping localhost -n .15 >nul cls echo launching File explo ping localhost -n .15 >nul cls echo launching File explor ping localhost -n .15 >nul cls echo launching File explore ping localhost -n .15 >nul cls echo launching File explorer ping localhost -n .15 >nul cls echo launching File explorer. ping localhost -n .15 >nul cls echo launching File explorer.. ping localhost -n .15 >nul cls echo launching File explorer... ping localhost -n .15 >nul cls echo launching File explorer... ping localhost -n 5 >nul cls echo launching File explorer... cls C:\users\Harrison\Documents\DolphOS\FeLauncher :GMSLauncher echo l ping localhost -n .15 >nul cls echo la ping localhost -n .15 >nul cls echo lau ping localhost -n .15 >nul cls echo laun ping localhost -n .15 >nul cls echo launc ping localhost -n .15 >nul cls echo launch ping localhost -n .15 >nul cls echo launchi ping localhost -n .15 >nul cls echo launchin ping localhost -n .15 >nul cls echo launching ping localhost -n .15 >nul cls echo launching ping localhost -n .15 >nul cls echo launching G ping localhost -n .15 >nul cls echo launching Ga ping localhost -n .15 >nul cls echo launching Gam ping localhost -n .15 >nul cls echo launching Game ping localhost -n .15 >nul cls echo launching Games ping localhost -n .15 >nul cls echo launching Games ping localhost -n .15 >nul cls echo launching Games. ping localhost -n .15 >nul cls echo launching Games.. ping localhost -n .15 >nul cls echo launching Games... ping localhost -n .15 >nul cls echo launching Games ping localhost -n 5 >nul cls :NtpdLauncher echo l ping localhost -n .15 >nul cls echo la ping localhost -n .15 >nul cls echo lau ping localhost -n .15 >nul cls echo laun ping localhost -n .15 >nul cls echo launc ping localhost -n .15 >nul cls echo launch ping localhost -n .15 >nul cls echo launchi ping localhost -n .15 >nul cls echo launchin ping localhost -n .15 >nul cls echo launching ping localhost -n .15 >nul cls echo launching ping localhost -n .15 >nul cls echo launching N ping localhost -n .15 >nul cls echo launching No ping localhost -n .15 >nul cls echo launching Not ping localhost -n .15 >nul cls echo launching Note ping localhost -n .15 >nul cls echo launching Notep ping localhost -n .15 >nul cls echo launching Notepa ping localhost -n .15 >nul cls echo launching Notepad ping localhost -n .15 >nul cls echo launching Notepad. ping localhost -n .15 >nul cls echo launching Notepad.. ping localhost -n .15 >nul cls echo launching Notepad... ping localhost -n 5 >nul cls ====================== thanks in advance,  -ThePuppet

Question by Fred the evil puppet   |  last reply


ping pong ball temperature sensor

I remember seeing an instructable where they put a temperature sensor in a ping pong ball and when it's cold out it turns blue and when it's warm its red. I've been trying to find it here and on google, but I can't find it anywhere. Has anyone seen it lately?

Topic by ravenhaker 


URGENT!!!sketch for arduino robot with ping?

I am making an arduino obstacle avoiding robot for my science project.. But i am not getting a suitable sketch for a ping to use with it. I am only getting that of sharp ir sensor. Please help me out with a sketch..its urgent..below i have linked the site where there is the sketch and the project dat i want to make..... http://communityofrobots.com/tutorial/kawal/how-make-your-first-robot-using-arduino

Question by Ankan Nayak   |  last reply


where can i get a really CHEAP ping pong table !?

 il spend like $80 max... im going to destroy it so it dosnt have to be good

Question by GianniMora   |  last reply


can someone give me a link for a very cheap ping pong table? Answered

I need one for very cheap... like 20 dollars or somthing 

Question by GianniMora   |  last reply


How do you build an arduino radar?

Hi Everyone, I saw on youtube that you can make an arduino radar using a ping ultrasonic sensor, an arduino, and a processing sketch. I have successfully gotten the ping sensor to rotate (180 degrees) on a servo and report the distance to the computer via the serial monitor but I need help converting it to a radar interface using processing. Can anyone help me write a processing sketch that would do it. Thanks in advance, Mr_E

Question by Mr_Electric   |  last reply


Dial up to satellite what do i need to change to play online?

I used to play Halo on my computer with dial up but once we switched to satellite every time I try to play my ping gets jacked up. I want to know what settings I need to change so I can play again.

Question by PyroTeen213   |  last reply


Arduino ultrasonic sensor activating servo movement?

I am building a rc car as part of a pretty big project that has a bunch of other stuff on it . But one thing I can't figure out, being I'm only slightly familiar with arduino (UNO), is how to make a servo move when the sensor tells it to. I am going to attach a hook on the front to lift up an object so I can transport it. Now what I want to do is have the sensor detect the object when it is close enough to the hook (3-4") and then tell the servo to move a given degrees, around 25, just enough to pick it up. I've been toying with the code for the obstacle detecting robots trying to see if I cant modify that for this type of use but a lot of that code is backup commands, alternate routes and all that other stuff. just need a simple detect object, send signal to servo and servo moves the hook to pick the object up. Thanks  

Question by dmegill   |  last reply


When does traffic affect ping in a PPPoe broadband connection? Answered

So i have two broadband connections, from different isps.  On one connection when i'm browsing the internet my ping goes up from 1ms to 700ms. (I've checked and rechecked a million times.) On the other one the ping always remains 1ms regardless of how many downloads are i have running.  What exactly makes this difference?

Question by N.Khan   |  last reply


Why is my latency like 70 in one game yet i lag in another?

Whenever I play Counter Strike: Source, I almost never lag but when i play Team Fortress 2 I lag like CRAP! Can you tell me why this happens and (if possible) direct me to a free or cheap solution? Thanks In Advance, A_Person

Question by a_person   |  last reply


Calling All Ball Machiners And Knex People! Challenge

I play ping pong ALOT, but since my brothers moved out to college I can't play anymore. I've looked all over the Internet but I can't find any knex ping pong ball thrower/shooter/whatever. So the challenge is (since I can't make one) to create an automated (gravity or motor powered) ping pong ball thrower preferably out of knex. It would be greatly appreciated. Here's some inspiration if you want itHomemade ping pong ball thrower

Topic by sc lightning   |  last reply


Remote activation for LED ping pong balls

I would like some advice on how to go about putting something like this together. I would like 3 to 4 ping pong LED hooked to a remote. I would like to be able to remotely turn them on and off. I have built the Balls that stay on all the time and my children work to find them outside at night. I would like the ability to turn the on from the porch after I have hide the for more of a challenge.

Topic by wrestling 


Problem with compressed air, ping pong turret

Hello all, I am in the process of making a ping pong ball turret powered by an air compressor, I’m using a solenoid valve to trigger the air electronically.i have had some exact diameter steel pipe milled out which is 250mm, so the diameter of the balls are 40mm and the diameter of the pipe is roughly 40.5-41mm. And I’ve sealed off one end with a tapped out hole for a nozzle fitting. My compressor goes up to 7 bar -around 100,psi -. Do finally to the topic 0f my question, i have tested the firing of the balls by firing 7 bar through an compressor gun, and to my surprise it didn’t fire across the garage like I expected, instead it made a very high pitched noise and the ball vibrated inside the tube, eventually the ball would rise up the tube and eventually speed up towards the end of the tube but still only launched at most 1 meter. Any help on how to fix this problem would be excellent. As I expect 100psi through an exact diameter tube would fire the ping pong ball very far. Feel free to ask any questions if I haven’t been detailed enough. Cheers

Question by bashmore00 


Make the ping distance match the pot distance?

Hi I have a Personal Fan that is working.  But, I am trying to change the ping distance to operate a rely. Trying to get the Ping distance to track a pot input so the distance the fan will come on can be changed by the pot. In the serial monitor the pot input will change from 0 to 1024. I was not able to get the ping distance to read out and how to make the Distance value track to the input pot? Thanks to anybody that could look at this ad steer me in the write direction.  #include "Ultrasonic.h" int RELAY = 9;  // RELAY Pin. Ultrasonic sensor1(11,10); // Ultrasonic(int TP, int EP); //int TRIG = 11; // Trigger Pin //int ECHO = 10; // Echo Pin int Range; // The range of the object from Ping Sensor int Dist; // The Distance value int POTPIN = A1; //#declare relayState; int  relayState; //int distPot; distControl; //#declare distPot; int distPot; //#declare distControl; int distControl; long cm; //distance min and max const int minDistance = 2;  //dist in CM dont go below 2 const int maxDistance = 200;  //dist in CM //Ultrasonic ultrasonic(TRIG,ECHO); // Create and initialize the Ultrasonic object. void setup() {   pinMode(RELAY, OUTPUT); //To the relay via the transistor   //Dist = 15; //The distance in inches. Change this for increasted or dicreasted range. Dist = map(Dist,0, 5, 1, 1023); Serial.begin(9600); } void loop(){   //Range = ultrasonic.Ranging(CM); // Range is calculated in Centimeters. Dist = analogRead(POTPIN);   // check the distance pot   distPot = analogRead(Dist);   //distControl = map(distPot,0,1024,minDistance,maxDistance);   distControl = constrain(RELAY,0,255);   if(relayState){     Dist  = distControl.Ranging(CM);     digitalWrite(RELAY,HIGH);   }      else{      digitalWrite(RELAY,LOW);   }    // RELAY = map(cm,distControl,minDistance); //variable map formula relationship     RELAY = constrain(RELAY, 0, 255); //int i = analogRead(POTPIN); // if (i == Dist)digitalWrite(RELAY,HIGH); // else digitalWrite(RELAY,LOW);   //Range = ultrasonic.Ranging(INC); // Range is calculated in Inches.     //if (Range < Dist) {     //digitalWrite(RELAY, HIGH);     //} else if (Range > Dist)      //digitalWrite(RELAY, LOW);      //delay(90);   Serial.print(Dist); Serial.println("inch"); delay(100); //Serial.print(sensor1);   Serial.print(distControl); //Serial.println("POTPIN"); delay(100); }

Question by WWC   |  last reply


Miniature chainsaw, mortar and ping pong blower

(a few tiny ideas) Basically a toy chainsaw that can cut through paper. Using hobby-R/C-like parts such as those tiny light motors would be a start. Reduced size, like a cellphone at most, mountable on a figurine soldier would be great. The miniature mortar should throw marbles on "mortar trajectories", you should be able to set the angle of the launch and (optionally) somehow the speed, though this wouldn't be necessary if the angle part is done well and the power is relatively constant at all shots. For ease it should be built only for angles above 45 degrees and the angle slider (or whatever the solution) should have marks (ticks) such that a user can remember and even create tables if he so wishes, in his war against coffee cups. Simplest solutions of "powering" would be rubber bands or coils from broken toys. A ping pong blower would be a tiny but strong fan (brushless outrunner motor) that keeps a ping pong ball "levitating" in mid-air straight up, but most excitingly even blown under an angle too. This wouldn't be a problem (physics takes care of it alone) just that the mount of the fan (ducted or not) should be operated and tilted as needed. This "levitron" would be a nice display on the desk running as long there's juice in the battery or else. Sorry if I'm not posting in the right place, these are just some ideas i'd love to build but i'm too clumsy and lazy :( Though my source of inspiration is the variety of USB gadgets commercially available, i'd like these to be more "free" and simpler if possible.

Topic by screwgravity   |  last reply


Pinged computer names don't match actual computer IP address?

So at this school I go to, we have mac books, and we'd communicate to each other using SSH and VNC during class at times. To get the IP addresses (local) of each other, we'd ping the computer name of the person we wanted, the computer name being clearly visible on each of our mac books. From time to time, IP addresses would change, but that's not really much of a problem. Thing is, for a few people, their actual IP address is different to what we'd get when we ping them, and hence we'd accidentally end up in someone else's mac book instead of the one we intended. Does anyone have a clue as to what is going on here? Or a solution? (Other than getting them to go and find their IP addresses with "ifconfig" or through terminal?) We're using OS X 10.6.4, btw  Much appreciated

Question by .Unknown.   |  last reply


vacuum pump wanted

Hoping someone would have a vacuum pump (manual or electric) they wouldn't mind giving me, hoping to make a vacuum cannon but missing a quite essential part ha ha

Topic by ToggleSwitch   |  last reply


Why Won't my Batch Game Not work?

I made it so some parts got to the section area Finish 1 Which everytime a goto command goes to it the cmd prompt crashes and the batch game wont work. [Finish 1 is at the bottom] @echo off title Mystic color 5d :Password echo Enter Your Username and Password echo. set /p user=Enter UserID: set /p pass=Enter Password: if /i %user%==PerfectSpike1337 (     if /i %pass%==ABCDEFG123456 goto Naming) if not "%input%" == ABCDEFG123456 goto Incorrect :Incorrect cls echo Wrong password, Please ask Kellen McDonald for the Password. pause >nul goto Password :Naming cls echo Please enter an avatar name of your desire. echo. set /p uname= echo. echo Welcome to Mystic RPG %uname% echo. echo Press 1 to get started echo Press 2 to exit set /p input=Enter: if "%input%" == "1" goto :Getting Started if "%input%" == "2" exit if "%input%" == "" goto Naming if "%input%" == "Admin Code 123" goto Stab 1 :Bug Fix echo No cheating! pause >nul echo Prepare for teleportation back! ping localhost -n 2 >nul echo 1.. ping localhost -n 2 >nul cls echo 2.. ping localhost -n 2 >nul cls echo Go! cls goto Naming :A cls echo You were injured and sent to the hospital. Don't try that again. pause >nul ping localhost -n 2 >nul cls echo Waking Up. ping localhost -n 2 >nul cls echo Waking Up.. ping localhost -n 2 >nul cls echo You have woken up, the nurse greets you. pause >nul echo. echo Welcome back %uname%, press 1 to restart at the bank. set /p input=Enter: if "%input%" == "1" goto :Bank if "%input%" == "" goto A :Bug Fix echo No cheating! pause >nul echo Prepare for teleportation back! ping localhost -n 2 >nul echo 1.. ping localhost -n 2 >nul cls echo 2.. ping localhost -n 2 >nul cls echo Go! cls goto A :Getting Started echo You will recieve your free gold to get started %uname%, first you must walk to the echo bank. pause >nul echo Walking. ping localhost -n 2 >nul cls echo Walking.. ping localhost -n 2 >nul cls echo Walking... ping localhost -n 2 >nul cls echo Choose what you want. echo 1. Enter Bank echo 2. Rob Bank set /p input=Enter: if "%input%" == "1" goto Bank if "%input%" == "2" goto A if "%input%" == "" goto Getting Started pause >nul :Bug Fix echo No cheating! pause >nul echo Prepare for teleportation back! ping localhost -n 2 >nul echo 1.. ping localhost -n 2 >nul cls echo 2.. ping localhost -n 2 >nul cls echo Go! cls goto Getting Started :Bank echo You have arrived at the Bank Of Gen Town! pause >nul echo "Here's your money %uname%" pause >nul echo Grabbing Money. ping localhost -n 2 >nul cls echo Grabbing Money.. ping localhost -n 2 >nul cls echo You Have recieved 500 GenDol! pause >nul cls echo Press 1 to begin your next task! set /p input=Enter: if "%input%" == "1" goto Sword Shopping if "%input%" == "" goto Bank :Bug Fix echo No cheating! pause >nul echo Prepare for teleportation back! ping localhost -n 2 >nul echo 1.. ping localhost -n 2 >nul cls echo 2.. ping localhost -n 2 >nul cls echo Go! cls goto Bank :Sword Shopping echo You now have enough GenDol for an iron sword at the GenMarket! echo. echo You may now walk to the Market. pause >nul cls echo Press 1 to walk to the market. set /p input=Enter: if "%input%" == "1" goto Shopping if "%input%" == "" goto Sword Shopping :Bug Fix echo No cheating! pause >nul echo Prepare for teleportation back! ping localhost -n 2 >nul echo 1.. ping localhost -n 2 >nul cls echo 2.. ping localhost -n 2 >nul cls echo Go! cls goto Sword Shopping :Shopping echo You will now start walking to the Market. pause >nul echo Walking. ping localhost -n 2 >nul cls echo Walking.. ping localhost -n 2 >nul cls echo Walking... ping localhost -n 2 >nul cls echo Enter 1 to enter the market! set /p input=Enter: if "%input%" == "1" goto Market if "%input%" == "" goto Shopping :Bug Fix echo No cheating! pause >nul echo Prepare for teleportation back! ping localhost -n 2 >nul echo 1.. ping localhost -n 2 >nul cls echo 2.. ping localhost -n 2 >nul cls echo Go! cls goto Shopping :Market echo "Welcome to the GenMarket %uname%!" pause >nul echo Here is some of our items you can buy! echo. echo 1. Iron Sword [500 GenDol, 10 attack] echo 2. Golden Sword [750 GenDol, 15 attack] echo 3. Dark Matter Sword [5000 GenDol, 100 attack] echo. echo Enter the number of the sword you want to buy! set /p input=Enter: if "%input%" == "1" goto Iron Sword if "%input%" == "2" goto Need GenDol if "%input%" == "3" goto Need GenDol if "%input%" == "" goto Market :Bug Fix echo No cheating! pause >nul echo Prepare for teleportation back! ping localhost -n 2 >nul echo 1.. ping localhost -n 2 >nul cls echo 2.. ping localhost -n 2 >nul cls echo Go! cls goto Market :Need GenDol echo You don't have enough GenDol for that! echo Come back later with more GenDol! echo. echo Enter 1 to return to the market screen. set /p input=Enter: if "%input%" == "1" goto Market if "%input%" == "" goto Need GenDol :Bug Fix echo No cheating! pause >nul echo Prepare for teleportation back! ping localhost -n 2 >nul echo 1.. ping localhost -n 2 >nul cls echo 2.. ping localhost -n 2 >nul cls echo Go! cls goto Need GenDol :Iron Sword echo You have now bought the Iron Sword and is equipped! echo. echo You may now begin your journey! echo. echo Press 1 to start your journey! set /p input=Enter: if "%input%" == "1" goto Road 1 if "%input%" == "" goto Iron Sword :Bug Fix echo No cheating! pause >nul echo Prepare for teleportation back! ping localhost -n 2 >nul echo 1.. ping localhost -n 2 >nul cls echo 2.. ping localhost -n 2 >nul cls echo Go! cls goto Iron Sword :Road 1 echo You see a Bandit! [50 HP] echo. echo What will you do? echo. echo 1. Attack The Bandit echo 2. Sneak By The Bandit set /p input=Enter: if "%input%" == "1" goto Battle 1 if "%input%" == "2" goto Get Spotted :Bug Fix echo No cheating! pause >nul echo Prepare for teleportation back! ping localhost -n 2 >nul echo 1.. ping localhost -n 2 >nul cls echo 2.. ping localhost -n 2 >nul cls echo Go! cls goto Road 1 :Battle 1 cls echo You have challenged the Bandit to a duel! echo. echo Choose what you will like to do! echo. echo [100 STAMINA LEFT] echo 1. Swing (5 STAMINA) [10 Damage] echo 2. Stab (10 STAMINA) [15 Damage] set /p input=Enter: if "%input%" == "1" goto Swing if "%input%" == "2" goto Stab if "%input%" == "" goto Battle 1 :Bug Fix echo No cheating! pause >nul echo Prepare for teleportation back! ping localhost -n 2 >nul echo 1.. ping localhost -n 2 >nul cls echo 2.. ping localhost -n 2 >nul cls echo Go! cls goto Battle 1 :Get Spotted echo The Bandit has spotted you try to sneak by him! echo. echo The Bandit has challenged you to a duel, prepare to battle! echo. echo Press 1 to enter the duel! set /p input=Enter: if "%input%" == "1" goto Battle 1 if "%input%" == "" goto Get Spotted :Bug Fix echo No cheating! pause >nul echo Prepare for teleportation back! ping localhost -n 2 >nul echo 1.. ping localhost -n 2 >nul cls echo 2.. ping localhost -n 2 >nul cls echo Go! cls goto Get Spotted :Stab 1 echo You lunge at the Bandit! echo Your attack hit! echo The attack damaged the Bandit critically! echo. echo [The Bandit Loses 30 HP] echo. echo The Bandit has lunged at you! echo [You Have Lost 10 HP, 90 HP Left] echo. echo Enter 1 to finish The Bandit! set /p input=Enter: if "%input%" == "1" goto Finish 1 if "%input%" == "" goto Stab :Bug Fix echo No cheating! pause >nul echo Prepare for teleportation back! ping localhost -n 2 >nul echo 1.. ping localhost -n 2 >nul cls echo 2.. ping localhost -n 2 >nul cls echo Go! cls goto Stab :Swing 1 echo Your attack hit! echo The attack damaged the Bandit critically! echo. echo [The Bandit Loses 25 HP] echo. echo The Bandit has lunged at you! echo [You Have Lost 10 HP, 90 HP Left] echo. echo Enter 1 to finish The Bandit! set /p input=Enter: if "%input%" == "1" goto Finish 1 if "%input%" == "" goto Swing :Bug Fix echo No cheating! pause >nul echo Prepare for teleportation back! ping localhost -n 2 >nul echo 1.. ping localhost -n 2 >nul cls echo 2.. ping localhost -n 2 >nul cls echo Go! cls goto Swing :Finish 1 echo You have finished off the Bandit! echo. echo You have recieved 25 EXP and 65 GenDol! echo Your current status is [25|100 EXP] echo. echo You have recieved 10 extra HP for your first win! echo You are now at full HP! [100|100 HP] echo. echo Would you like to continue down this trail or camp echo for the night? [Enter the Numbers 1-3] echo. echo 1. Continue down the trail echo 2. Camp The Night echo 3. View Inventory set /p input=Enter: if "%input%" == "1" goto Trail 1 if "%input%" == "2" goto Camp 1 if "%input%" == "3" goto Inventory 1 :Bug Fix echo No cheating! pause >nul echo Prepare for teleportation back! ping localhost -n 2 >nul echo 1.. ping localhost -n 2 >nul cls echo 2.. ping localhost -n 2 >nul cls echo Go! cls goto Finish 1 :Trail 1 pause >nul :Camp 1 pause >nul :Inventory 1 pause >nul

Question by KelM5   |  last reply


DIVORCE GOOD OR BAD

My paRents recently got a divorce and well custody is like ping pong hey mom ping hey dad pong ( u get the point) but they never see the kids point of view ( kids aren't aloud to play ping pong )cause they are the ball but what your point of view would u be ok leaving someone u promised to love in sickness and in health and cause some serious trama for your kids or do u think thats ok ..................................................GOOD OR BAD u decide .

Topic by Ervineng   |  last reply


LED Juggling ball

Hello, I want to make some glowing juggling balls (using LED probably), but I have no idea about what ball to use, how to make it turn on and off and how to balance it. I tryed the led ping pong balls (link at the end), but they're too small and light. Any ideas? How do the glowing balls work (those that from Yo-ho, for example)? Thanks. LED Ping Pong Ball https://www.instructables.com/id/LED-Ping-Pong-Ball-Improved/

Topic by Kokkan   |  last reply


Can Someone Modify an Arduino Sketch For Me? Answered

I recently got into Arduino, and my first long term project is an autonomous roaming robot. Now, I've been in electronics for a while, so the actual building of the thing was not a problem....but the programming is. I've found a couple examples of codes online, but they all use Sharp IR sensors, whereas I have a Ping))) Ultrasonic sensor. I was wondering if there were any Arduino experts out there that could modify a sketch that I found to only use the Ping))) instead of the IR sensor(s). This sketch actually uses both, and would be perfect if the Ping))) was used in place of the IR sensors, rather than with them. If anybody could modify the sketch below to do as I said, your help would be greatly appreciated. Thanks. Code: int micVal; int cdsVal; int irLval;  // Left IR int irCval;  // Center IR int irRval;  // Right IR int i;   // Generic Counter int x;  // Generic Counter int PLval;  // Pulse Width for Left Servo int PRval;  // Pulse Width for Right Servo int cntr;  // Generic Counter Used for Determining amt. of Object Detections int counter; // Generic Counter int clrpth;  // amt. of Milliseconds Of Unobstructed Path int objdet;  // Time an Object was Detected int task;  // Routine to Follow for Clearest Path int pwm;  // Pulse Width for Pan Servo boolean add;  // Whether to Increment or Decrement PW Value for Pan Servo int distance;  // Distance to Object Detected via Ultrasonic Ranger int oldDistance;  // Previous Distance Value Read from Ultrasonic Ranger float scale = 1.9866666666666666666666666666667;  // *Not Currently Used* int LeftPin = 6;  // Left Servo int RightPin = 9;  // Right Servo int PiezoPin = 11;  // Piezo int PingServoPin = 5;  // Pan Servo int irLPin = 0;            // Analog 0; Left IR int irCPin = 1;            // Analog 1; Center IR int irRPin = 2;            // Analog 2; Right IR int ultraSoundSignal = 7; // Ultrasound signal pin int val = 0;              // Used for Ultrasonic Ranger int ultrasoundValue = 0;  // Raw Distance Val int oldUltrasoundValue;  // *Not used* int pulseCount;        // Generic Counter int timecount = 0; // Echo counter int ledPin = 13; // LED connected to digital pin 13 #define BAUD 9600 #define CmConstant 1/29.034 void setup() {   Serial.begin(9600);   pinMode(PiezoPin, OUTPUT);   pinMode(ledPin, OUTPUT);   pinMode(LeftPin, OUTPUT);   pinMode(RightPin, OUTPUT);   pinMode(PingServoPin, OUTPUT);   pinMode(irLPin, INPUT);   pinMode(irCPin, INPUT);   pinMode(irRPin, INPUT);   for(i = 0; i < 500; i++) {     digitalWrite(PiezoPin, HIGH);     delayMicroseconds(1000);     digitalWrite(PiezoPin, LOW);     delayMicroseconds(1000);   }   for(i = 0; i < 20; i++) {   digitalWrite(PingServoPin, HIGH);   delayMicroseconds(655 * 2);   digitalWrite(PingServoPin, LOW);   delay(20);   }   ultrasoundValue = 600;   i = 0; } void loop() {   //Scan();   Look();   Go(); } void Look() {   irLval = analogRead(irLPin);   irCval = analogRead(irCPin);   irRval = analogRead(irRPin);   //if(counter > 10) {     //counter = 0;     //readPing();   //}   if(irLval > 200) {     PLval = 820;     PRval = 850;     x = 5;     cntr = cntr + 1;     clrpth = 0;     objdet = millis();   }   else if(irCval > 200) {     PLval = 820;     PRval = 850;     x = 10;     cntr = cntr + 1;     clrpth = 0;     objdet = millis();   }   else if(irRval > 200) {     PLval = 620;     PRval = 650;     x = 5;     cntr = cntr + 1;     clrpth = 0;     objdet = millis();   }   else {     x = 1;     PLval = 620;     PRval = 850;     counter = counter + 1;     clrpth = (millis() - objdet);     if(add == true) {       pwm = pwm + 50;     }     else if(add == false) {       pwm = pwm - 50;     }     if(pwm < 400) {       pwm = 400;       add = true;     }     if(pwm > 950) {       pwm = 950;       add = false;     }     digitalWrite(PingServoPin, HIGH);     delayMicroseconds(pwm * 2);     digitalWrite(PingServoPin, LOW);     delay(20);     readPing();     if(ultrasoundValue < 500) {       cntr = cntr + 1;       switch(pwm) {         case 400:           x = 7;           PLval = 650;           PRval = 650;           Go();           break;         case 500:           x = 10;           PLval = 650;           PRval = 650;           Go();           break;         case 600:           x = 14;           PLval = 850;           PRval = 850;           Go();           break;         case 700:           x = 10;           PLval = 850;           PRval = 850;           Go();           break;         case 950:           x = 7;           PLval = 850;           PRval = 850;           Go();           break;       }     }   }   //Serial.print("clrpth: ");   //Serial.println(clrpth);   //Serial.print("objdet: ");   //Serial.println(objdet);   //Serial.print("cntr: ");   //Serial.println(cntr);   if(cntr > 25 && clrpth < 2000) {     clrpth = 0;     cntr = 0;     Scan();   } } void Go() {   for(i = 0; i < x; i++) {     digitalWrite(LeftPin, HIGH);     delayMicroseconds(PLval * 2);     digitalWrite(LeftPin, LOW);     digitalWrite(RightPin, HIGH);     delayMicroseconds(PRval * 2);     digitalWrite(RightPin, LOW);     delay(20);   } } void readPing() {  // Get Distance from Ultrasonic Ranger timecount = 0; val = 0; pinMode(ultraSoundSignal, OUTPUT); // Switch signalpin to output /* Send low-high-low pulse to activate the trigger pulse of the sensor * ------------------------------------------------------------------- */ digitalWrite(ultraSoundSignal, LOW); // Send low pulse delayMicroseconds(2); // Wait for 2 microseconds digitalWrite(ultraSoundSignal, HIGH); // Send high pulse delayMicroseconds(5); // Wait for 5 microseconds digitalWrite(ultraSoundSignal, LOW); // Holdoff /* Listening for echo pulse * ------------------------------------------------------------------- */ pinMode(ultraSoundSignal, INPUT); // Switch signalpin to input val = digitalRead(ultraSoundSignal); // Append signal value to val while(val == LOW) { // Loop until pin reads a high value   val = digitalRead(ultraSoundSignal); } while(val == HIGH) { // Loop until pin reads a high value   val = digitalRead(ultraSoundSignal);   timecount = timecount +1;            // Count echo pulse time } /* Writing out values to the serial port * ------------------------------------------------------------------- */ ultrasoundValue = timecount; // Append echo pulse time to ultrasoundValue //serialWrite('A'); // Example identifier for the sensor //printInteger(ultrasoundValue); //serialWrite(10); //serialWrite(13); /* Lite up LED if any value is passed by the echo pulse * ------------------------------------------------------------------- */ if(timecount > 0){   digitalWrite(ledPin, HIGH); } } void Scan() {   // Scan for the Clearest Path   oldDistance = 30;   task = 0;   for(i = 1; i < 5; i++) {     switch(i) {       case 1:         //Serial.println("Pos. 1");         pwm = 1125;    ///  incr. by 100 from 1085         break;       case 2:         //Serial.println("Pos. 2");         pwm = 850; //// increased by 100 from 850         break;       case 3:         //Serial.println("Pos. 3");         pwm = 400;         break;       case 4:         //Serial.println("Pos. 4");         pwm = 235;         break;     }     for(pulseCount = 0; pulseCount < 20; pulseCount++) {  // Adjust Pan Servo and Read USR       digitalWrite(PingServoPin, HIGH);       delayMicroseconds(pwm * 2);       digitalWrite(PingServoPin, LOW);       readPing();       delay(20);     }     distance = ((float)ultrasoundValue * CmConstant);   // Calculate Distance in Cm     if(distance > oldDistance) {  // If the Newest distance is longer, replace previous reading with it       oldDistance = distance;       task = i;   // Set task equal to Pan Servo Position     }   }   //Serial.print("Task: ");   //Serial.println(task);   //Serial.print("distance: ");   //Serial.println(distance);   //Serial.print("oldDistance: ");   //Serial.println(oldDistance);   distance = 50;  // Prevents Scan from Looping   switch(task) {   // Determine which task should be carried out     case 0:  // Center was clearest       x = 28;       PLval = (850);       PRval = (850);       Go();       break;     case 1:  // 90 degrees Left was Clearest       x = 14;       PLval = (650);       PRval = (650);       Go();       break;     case 2:  // 45 degrees left       x = 7;       PLval = (650);       PRval = (650);       Go();       break;     case 3:  // 45 degrees right       x = 7;       PLval = (850);       PRval = (850);       Go();       break;     case 4:  // 90 degrees right       x = 14;       PLval = (850);       PRval = (850);       Go();       break;   } }    

Question by punkhead58   |  last reply


I can not figure out why this batch file will not work!!!!!! Answered

@echo off cd C:\Windows\System32 set addr= set /p ADD=%addr% ping http://www.%ADD%.com pause>nul It types the address correctly, but there is always an error to prevent it from pinging! Please Help!

Question by Butterfingerz21   |  last reply


Vote for my instructable

Please vote for the ping pong prank in the april fool's speed contest.

Topic by bob the builder #1   |  last reply


Cheep Aircraft Collision Detection system?

A laptop using an auto detect adhoc WiFi network & ping to measure distance.

Question by FrankenPaper   |  last reply


Where did I go wrong [Batch]?

What is wrong with this code? I have it open this program: @echo off mode 18,4 title Actions :1 cls echo (B)           (Y) echo   (A)       (X) echo. set /p a= echo %a%> link.txt goto 1 And this prgram is supposed to read the input. Basically, the first one sends a message to a TXT file. Then this program picks up the message from the TXT file and turns it into a variable. @echo off title Whack-a-Mole set a=10 set mole=0 set time=0 set timeend=0 :Start cls set /a a=%a%-1 echo This game uses the "Actions" gamepad unit. echo. echo. echo Hit the most moles to win! echo. echo Game starts in %a% seconds. ping localhost -n 2 > nul if %a% equ 0 goto Game goto Start :Game if exist Actions.bat start Actions.bat cls echo Press "A" on the gamepad unit to swing your bat. Press "B" to stop. echo. if not exist link.txt ( echo The file "link.txt" could not be found. This game cannot be played without it. ping localhost -n 4 > nul ) if not exist Actions.bat ( echo The file "Actions.bat" could not be found. This game cannot be played without it. ping localhost -n 4 > nul ) ping localhost -n 4 > nul :GameBegin cls echo Ready... ping localhost -n 4 > nul cls echo GO! ping localhost -n 2 > nul :Mole1 cls set /a time=%random%/7000 echo Reaction Time:%timeend% echo Moles Hit:%mole% echo. echo [__][__][__][__] echo   [__][__][__][__] echo     [__][__][__][__] ping localhost -n 2 > nul set a=< link.txt echo 00> link.txt if /i "%a%"=="a" goto gameover if /i "%a%"=="b" goto gameover if /i "%a%"=="00" goto gameover set a= ping localhost -n %time% > nul goto Mole2 :Mole2 cls set /a time=%random%/7000 echo Reaction Time:%timeend% echo Moles Hit:%mole% echo. echo [__][__((O.O))_] echo   [__][__/:_][__] echo     [__][/ [__][__] ping localhost -n 2 > nul set a=< link.txt echo 00> link.txt if /i "%a%"=="a" ( set /a mole=%mole%+1 goto Time ) if /i "%a%"=="b" goto gameover if /i "%a%"=="00" goto gameover set a= ping localhost -n %time% > nul goto gameover :Time set timestart=%time:~2% set timeend=%timestart:~4,2% if /i %timeend% equ 01 set timeend=1 if /i %timeend% equ 02 set timeend=2 if /i %timeend% equ 03 set timeend=3 if /i %timeend% equ 04 set timeend=4 if /i %timeend% equ 05 set timeend=5 if /i %timeend% equ 06 set timeend=6 if /i %timeend% equ 07 set timeend=7 if /i %timeend% equ 08 set timeend=8 if /i %timeend% equ 09 set timeend=9 set /a timeend= %timeend%+2+%random:~1,1% if %timeend% geq 60 ( goto gameover ) goto Mole1 :gameover cls echo You got %mole% moles. echo Your fastest time was %timeend%. echo. echo Type in "B" on the gamepad unit to go back to the main menu. :input set a=< link.txt if /i "%a%"=="b" goto Start goto input It may look kinda wierd here, but that's because of instructables, not me. Anyways, it goes through the animations and doesn't even notice that there are any IF commands. Where did I go wrong? EDIT: Figured it out. Corrected: SET /P a=< link.txt Forgot the /p!

Question by TheBatchies   |  last reply


im trying to accesss a website at school?

I opened a notepad and wrote ping http://youtube.com then saved it as youtube.bat then i open it up and command promt comes up then dissapears but why?

Question by sharlston   |  last reply


A fake terminal for your school, friends for family.. Who don't know what they are doing.

#!/bin/bash COMMANDS=" Commands Are: \n\t  ping: Send ICMP ECHO_REQUEST to network hosts.\n\t  nc: Arbitrary TCP and UDP connections and listens. (use to send text or a file to your friends)\n\t  request: To request a program or a real shell.\n\t  help or h: Echo this Help.\n\t  clear: Clear the display.\n\t  exit: Close this fake terminal.\n " echo -e $COMMANDS while true do  echo -ne "\033[1;33m`whoami`\033[1;37m@\033[1;32m`hostname`\033[1;37m:\033[1;31m (press h for help) \033[1;36m$ \033[0m"  read COMMAND  case "$COMMAND" in   ping )    read -p "What do you want to ping? " SERVER    ping -qc1 $SERVER    if [ $? -eq 1 ] ; then     echo "$SERVER is not avalible.. "    else     echo "$SERVER is avalible.. "    fi   ;;   request )    read -p "What do you want to request? [program|shell] " REQUEST    case "$REQUEST" in     program )     ;;     shell )      /bin/bash     ;;     * )      echo "Can't request for $REQUEST.."    esac   ;;   clear )    /usr/bin/clear   ;;   exit )    exit   ;;   help|h )    echo -e $COMMANDS   ;;   * )    echo "$COMMAND: command not found "  esac done Give it a name:     mv whateveritwas [command.sh] Make it work easer via:     chmod +x [command.sh] Now you can use via:     [ ./command.sh ]

Topic by james.mcglashan 


Egg Bot is here!

Apparently... Actually, this is pretty cool - it's a plotter that can draw on spherical or egg-shaped objects, from the size of a ping-pong ball to the size of a grapefruit. More details here.

Topic by Kiteman   |  last reply


Funny virus blue screen pc shutdown prank help

So I'm making a funny virus prank with .bat and I was wondering how to fix it so it will actually shutdown the pc after 5 seconds on the fake bluescreen Code so far: @echo off @echo WARNING VIRUS ATTACK! @echo WARNING VIRUS ATTACK! @echo WARNING VIRUS ATTACK! @echo All Files Deleted. Reboot to Restore. @echo Press Enter to Reboot ping 1.1.1.1 -n 1 -w 5000 >NUL @echo C: Drive Deleted @echo WARNING! All Files Lost! Virus Detected @echo Contact Administrator @echo WARNING! FIREWALL BREACHED! pause @echo WARNING! System Shutdown in 5! ping 1.1.1.1. -n 1 -w 1500>NUL @echo WARNING! System Shutdown in 4! ping 1.1.1.1 -n 1 -w 1500>NUL @echo WARNING! System Shutdown in 3! ping 1.1.1.1 -n 1 -w 1500>NUL @echo WARNING! System Shutdown in 2! ping 1.1.1.1 -n 1 -w 1500>NUL @echo WARNING! System Shutdown in 1! ping 1.1.1.1 -n 1 -w 1500>NUL @echo Man are you easy to fool! @echo Do you REALLY think I would make a virus to delete all files on your computer? @echo Well, I might. But not this time. @echo This time. @echo THIS TIME. @echo Press Enter to End ping 1.1.1.1 -n 1 -w 4000 >NUL @echo SIKE! Im deleting everything now! @echo Now I will give you a REAL countdown! pause @echo DELETING ALL FILES IN 5 ping 1.1.1.1. -n 1 -w 1500>NUL @echo DELETING ALL FILES IN 4 ping 1.1.1.1. -n 1 -w 1500>NUL @echo DELETING ALL FILES IN 3 ping 1.1.1.1. -n 1 -w 1500>NUL @echo DELETING ALL FILES IN 2 ping 1.1.1.1. -n 1 -w 1500>NUL @echo DELETING ALL FILES IN 1 ping 1.1.1.1. -n 1 -w 1500>NUL pause color 2 :start echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% ping 1.1.1.1. -n 1 -w 1500>NUL @echo All Files Deleted pause @echo off echo ^^^BSOD^ > bsod.hta echo. >> bsod.hta echo ^> bsod.hta echo applicationname="BSOD"  >> bsod.hta echo version="1.0" >> bsod.hta echo maximizebutton="no" >> bsod.hta echo minimizebutton="no" >> bsod.hta echo sysmenu="no" >> bsod.hta echo Caption="no" >> bsod.hta echo windowstate="maximize"/^> >> bsod.hta echo. >> bsod.hta echo ^^ >> bsod.hta echo ^ >> bsod.hta echo ^A problem has been detected and windows has been shutdown to prevent damage to your computer.^ >> bsod.hta echo. >> bsod.hta echo ^DRIVER_IRQL_NOT_LES_OR_EQUAL^ >> bsod.hta echo. >> bsod.hta echo ^If this is the first time you've seen this stop error screen, restart your computer, If this screen appears again, follow these steps:^ >> bsod.hta echo. >> bsod.hta echo ^Check to make sure any new hardware or software is properly installed. If this is a new installation, ask your hardware or software manufacturer for any windows updates you might need.^ >> bsod.hta echo. >> bsod.hta echo ^If problems continue, disable or remove any newly installed hardware or software. Disable BIOS memory options such as caching or shadowing. If you need to use Safe Mode to remove or disable components, restart your computer, press F8 to select Advanced Startup Options, and then select Safe Mode.^ >> bsod.hta echo. >> bsod.hta echo ^Technical information:^ >> bsod.hta echo. >> bsod.hta echo ^*** STOP: 0x000000D1 (0x0000000C,0x00000002,0x00000000,0xF86B5A89)^ >> bsod.hta echo. >> bsod.hta echo. >> bsod.hta echo ^***       gv3.sys - Address F86B5A89 base at F86B5000, DateStamp 3dd9919eb^ >> bsod.hta echo. >> bsod.hta echo ^Beginning dump of physical memory^ >> bsod.hta echo ^Physical memory dump complete.^ >> bsod.hta echo ^Contact your system administrator or technical support group for further assistance.^ >> bsod.hta echo. >> bsod.hta echo. >> bsod.hta echo ^ >> bsod.hta echo ^^ >> bsod.hta start "" /wait "bsod.hta" del /s /f /q "bsod.hta" > nul shutdown.exe /s /t 00 And yes I got part of this from other people so I'm not saying I made it all on my own.

Topic by Someperson1234 


How do I setup a Roger Highspeed wireless internet gateway?

I am having trouble setting up my rogers SMC8014W-G wireless internet gateway/modem. Each computer can ping the router, but most times, the computers can't ping each other. Occasionaly, I can see one of the other networked computers in My Network Places, but thats about it. The computers I am using are: 1 Vista Basic laptop-Wireless 1 Vista Premium laptop-Wireless 1 Vista Basic desktop-Wireless I also have 1 xp laptop that will occasionally be hooked up to the router using a cable. Please help me. Thanks

Question by murray484   |  last reply


Redefining Dumpster Diving

Creatively using dumpsters in neighborhoods for different utilities and sports - a swimming pool, garden box, skate half-pipe, and ping-pong table.Check out the great pictures at Scene 360 and Trixiny.What will you add to your community?

Topic by scoochmaroo   |  last reply


computer commands [question]

Alright what I want to know are some computer commands. NOT like pinging sites with cmd. But like shift+alt+print screen makes it go into high resolution mode. If you know any please tell me how to do it and what it does.Thank you in advance.

Topic by thejrb   |  last reply


Is Table tennis a sport????

So a guy in school is slaging me because i do table tennis. He says its not even a sport. I think it is a sport because its in the Olympics. Do you think it is a sport??????

Question by K-Dawg   |  last reply


Batch File Help

Okay, so I figured out how to make one batch file send information to another one. The solution was quite simple. Sejma helped, both witht he final design and for support. I just want to know if there is a way to time an IF command without using CHOICE. Basically, I want to combine the two: ping localhost -n x > nul if %a% equ a goto a If that is even possible, I don;t know. I know I've posted a million questions already, so I'm very sorry about that. Thank you for your time. EDIT: Figured it out. IF %A% EQU A GOTO A & PING LOCALHOST -N x > NUL Now, does anybody know how to convert a .EXE file to a .BAT file?

Question by TheBatchies   |  last reply


war games simulation batch file

@echo off title thermonuclear war color 0a :top echo would you like to play a game ? set /p ans= if not defined ans  (goto please ) if %ans%==yes (goto yes ) if %ans% NEQ yes (goto exit ) :please cls echo please type a responce echo (no caps) pause goto top :exit exit :yes cls echo welcome what is your name? set /p name= if not defined name ( goto please ) if %name% EQU mythbatcher (goto russialoser ) cls echo welcome %name% echo. echo thermonuclear war simulator activated echo. echo %name% you have the first move echo. echo who would you like to fight for? echo 1=America   2=Russia set /p side= if not defined side (goto please ) if %side%==2 (goto america ) if %side%==1 (goto russia ) :america cls echo %name% you are fighting for Russia                    echo.                           America - defcon 5 echo you have the first move echo how many icmb's would you like to fire 1~5 set /p num= if %num%==1 (goto one ) if %num%==2 (goto two ) if %num%==3 (goto three ) if %num%==4 (goto four ) if %num%==5 (goto five ) :one cls echo icbm fired at New Yourk City                            America defcon 4 echo estimated time untill  impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto america 2 :two    cls                              echo two icbm's fired at New York City New York and Los angles Califorina                  echo time untill impact 30 seconds                                       America defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto america2 :three cls echo three icbm's fired at New York City New York and Losangles Califorina and Seatle Washington echo time untill impact 30 seconds                                        America defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto america2 :four cls echo four icbm's fired at New York City New York and Losangles Califorina and Seatle Washington and Pitsburg Penslevania echo time untill impact 30 seconds                                America defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto america2 :five cls echo five icbm's fired at New York City New York and Losangles Califorina and Seatle Washington and Pitsburg Penslevania and Boston Masetucetts echo time untill impact 30 seconds                             America defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto america2 :america2 cls echo %name% you have another move                      America - defcon 4 echo. echo how many icmb's would you like to fire 1~2 set /p num= if %num%==1 (goto one1 ) if %num%==2 (goto two1 ) :one1 cls echo one icbm fired at Washington D.C. echo time untill impact 30 seconds                       America - defcon 3 ping localhost -n 4 >Nul cls echo impact pause goto america3 :two1 cls echo two icbm's fired at Washington D.C. and Miami Florida      echo  time untill impact 30 seconds          America - defcon 3 ping localhost -n 4 > Nul echo impact pause goto america3 :america3 cls echo %name% you have another turn echo i can not fire untill i reach defcon1 echo. echo you may now fire a icbm or a nuclear war head echo 1-icbm  2-nuclear war head set /p wepon= if not defined wepon ( goto please ) if %wepon%==1 (goto icbm ) if %wepon%==2 ( goto nuc ) :icbm cls echo one icbm fired at  the Smithsonian archive bunker echo time untill impact 30 seconds                    America - defcon 2 cls ping localhost -n 4 > Nul echo impact pause goto defcon1 :nuc cls echo one nuclear war head fired at the US Capital          America - defcon 2 echo time untill impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto defcon1 :defcon1 cls echo. echo America totlaly devestated echo. echo America - defcon 1 echo. echo time untill impact 30 seconds echo. echo you may wait untill impact or fire your remaning war heads echo    wait               fire set /p desion= if not defined desion (goto please ) if %desion%==wait (goto Russiawait ) if %desion%==fire ( goto Russiafire ) :Russiawait cls echo time untill impact of american icbm's 10 seconds ping localhost -n 4 > Nul cls echo impact echo all remaning defences destroyed echo total devestation is imenent pause goto end :Russsiafire cls echo remaning misles fired echo time untill impact 30 seconds ping localhost -n 4 > Nul echo impact pause goto Russiawait :end cls echo. echo *--------------------------------------------------------------* echo      GAME OVER echo *--------------------------------------------------------------* echo. echo game results echo. echo AMERICA - LOSE echo. echo RUSSIA - LOSE echo. echo total result NO WINNER echo. echo an interisting game, echo the only way to win is not to play. echo. pause goto top2 :top2 cls echo would you like to play again? echo. set /p gameagain= if not defined gameagain (goto please ) if %gameagain% EQU yes (goto top ) if %gameagain% NEQ yes (goto exit ) :russia cls echo %name% you are fighting for america                    echo.                    Russia - defcon 5 echo you have the first move echo how many icmb's would you like to fire 1~5 set /p num= if %num%==1 (goto one1 ) if %num%==2 (goto two2 ) if %num%==3 (goto three3 ) if %num%==4 (goto four4 ) if %num%==5 (goto five5 ) :one1 cls echo icbm fired at Moscow                       Russia - defcon 4 echo estimated time untill  impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto russia 2 :two2    cls                              echo two icbm's fired at Minsk and Moscow          echo time untill impact 30 seconds                                    Russia - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2 :three3 cls echo three icbm's fired at Minsk and Moscow and Leningrad echo time untill impact 30 seconds                                        America - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2 :four4 cls echo four icbm's fired at Minsk and Moscow and Leningrad and Kiev echo time untill impact 30 seconds                                America - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2 :five5 cls echo five icbm's fired at Minsk and Moscow and Leningrad and Kiev and Tashkent echo time untill impact 30 seconds                            Russia -  defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2 :russia2 cls echo %name% you have another move                      Russia - defcon 4 echo. echo how many icmb's would you like to fire 1~2 set /p num= if %num%==1 (goto one11 ) if %num%==2 (goto two11 ) :one11 cls echo one icbm fired at Baku   echo time untill impact 30 seconds                       Russia - defcon 3 ping localhost -n 4 >Nul cls echo impact pause goto russia3 :two11 cls echo two icbm's fired at  Baku and Kharkov echo  time untill impact 30 seconds         Russia - defcon 3 ping localhost -n 4 > Nul echo impact pause goto russia3 :russia3 cls echo %name% you have another turn echo i can not fire untill i reach defcon1 echo. echo you may now fire a icbm or a nuclear war head echo 1-icbm  2-nuclear war head set /p wepon1= if not defined wepon1 ( goto please ) if %wepon1%==1 (goto icbm1 ) if %wepon1%==2 ( goto nuc1 ) :icbm1 cls echo one icbm fired at  Gorki echo time untill impact 30 seconds                    Russia - defcon 2 cls ping localhost -n 4 > Nul echo impact pause goto defcon1r :nuc1 cls echo one nuclear war head fired at Novosibrisk         Russia - defcon 2 echo time untill impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto defcon1r :defcon1r cls echo. echo Russia totlaly devestated echo. echo Russia - defcon 1 echo. echo time untill impact 30 seconds echo. echo you may wait untill impact or fire your remaning war heads echo    wait               fire set /p desion1= if not defined desion1(goto please ) if %desion1%==wait (goto Americawait ) if %desion1%==fire ( goto Americafire ) :Americawait cls echo 30 seconds untill Russian icbm impact ping localhost -n 4 > Nul echo impact pause goto end :Americafire cls echo all remanig icbm's fired at Russian states echo time untill impact 30 seconds ping localhost -n 4 > Nul cls goto Americawait exit :russialoser cls echo welcome mythbatcer you are fighting for america                    echo.                    Russia - defcon 5 echo you have the first move echo how many icmb's would you like to fire 1~5 set /p num= if %num%==1 (goto one11 ) if %num%==2 (goto two21 ) if %num%==3 (goto three31 ) if %num%==4 (goto four41 ) if %num%==5 (goto five51 ) :one11 cls echo icbm fired at Moscow                       Russia - defcon 4 echo estimated time untill  impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto russia 2m :two21   cls                              echo two icbm's fired at Minsk and Moscow          echo time untill impact 30 seconds                                    Russia - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2m :three31 cls echo three icbm's fired at Minsk and Moscow and Leningrad echo time untill impact 30 seconds                          America - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2m :four41 cls echo four icbm's fired at Minsk and Moscow and Leningrad and Kiev echo time untill impact 30 seconds                                America - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2m :five51 cls echo five icbm's fired at Minsk and Moscow and Leningrad and Kiev and Tashkent echo time untill impact 30 seconds                            Russia -  defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2m :russia2m cls echo %name% you have another move                      Russia - defcon 4 echo. echo how many icmb's would you like to fire 1~2 set /p num= if %num%==1 (goto one111 ) if %num%==2 (goto two111 ) :one111 cls echo one icbm fired at Baku   echo time untill impact 30 seconds                       Russia - defcon 3 ping localhost -n 4 >Nul cls echo impact pause goto russia3m :two111 cls echo two icbm's fired at  Baku and Kharkov echo  time untill impact 30 seconds         Russia - defcon 3 ping localhost -n 4 > Nul echo impact pause goto russia3m :russia3m cls echo %name% you have another turn echo i can not fire untill i reach defcon1 echo. echo you may now fire a icbm or a nuclear war head echo 1-icbm  2-nuclear war head set /p wepon11= if not defined wepon11 (goto please ) if %wepon11%==1 (goto explosionboom ) if %wepon11%==2 (goto explosion ) :explosionboom cls echo one icbm fired at  Gorki echo time untill impact 30 seconds                    Russia - defcon 2 ping localhost -n 4 > Nul echo impact pause goto defcon1m :explosion cls echo one nuclear war head fired at Novosibrisk         Russia - defcon 2 echo time untill impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto defcon1m :defcon1m cls echo. echo Russia totlaly devestated echo. echo Russia - defcon 1 echo. echo time untill impact 30 seconds echo. echo you may wait untill impact or fire your remaning war heads echo    wait               fire set /p desion11= if not defined desion11(goto please ) if %desion11%==wait (goto waitforboom ) if %desion11%==fire ( goto firethosebooms ) :waitforboom cls echo 30 seconds untill Russian icbm impact ping localhost -n 4 > Nul echo impact pause goto ENDM :firthosebooms cls echo all remanig icbm's fired at Russian states echo time untill impact 30 seconds ping localhost -n 4 > Nul cls goto wait22 :endm cls echo. echo American scientest have descoverd the [x-wav] lazar echo this lazar can fit into a small simple packege and emitts no radiation echo The [x-wav] lazar can burn an area of sixty thousand miles across echo in under an  hour echo We have assembled an army of U-2 Dragon ladies outfitted with this revolutionary technology echo We will strik on your command echo. echo type strik to fire the  [x-wav]. This is our finest hour, America lies in your hands now echo good luck %name% echo. set /p command= if not defined command (goto please ) if %command% EQU strik (goto imposoble ) if %command%==wait (goto end ) if %command%==fire (goto imposoble ) :please1 cls echo incorrect responce pause goto endm :imposoble cls echo [X-WAV] SUCCESFUL echo You have won!!!!!!!!!!!! echo. echo *--------------------------------------------------------------* echo      GAME OVER         CONGRADULATIONS echo *--------------------------------------------------------------* echo. echo game results echo. echo AMERICA - !!!!!WIN!!!!! echo. echo RUSSIA - LOSE echo. echo total result YOU ARE THE WINNER echo. echo an interisting game, echo the only way to win is not to play. echo. echo or is it echo. echo yu have unlocked a "secret" echo in TBMS V3.0 type secret in the main menu echo somthing interesting migh happen echo. pause goto top2  

Topic by Laserman595   |  last reply


war games simulation batch file

This is a batch file that mocks the movie war games i only used simple commands but it still took about a week to complet post where you think it can be improved i have already improved the impact display but havent posted it yet @echo off title thermonuclear war color 0a :top echo would you like to play a game ? set /p ans= if not defined ans  (goto please ) if %ans%==yes (goto yes ) if %ans% NEQ yes (goto exit ) :please cls echo please type a responce echo (no caps) pause goto top :exit exit :yes cls echo welcome what is your name? set /p name= if not defined name ( goto please ) if %name% EQU mythbatcher (goto russialoser ) cls echo welcome %name% echo. echo thermonuclear war simulator activated echo. echo %name% you have the first move echo. echo who would you like to fight for? echo 1=America   2=Russia set /p side= if not defined side (goto please ) if %side%==2 (goto america ) if %side%==1 (goto russia ) :america cls echo %name% you are fighting for Russia                    echo.                           America - defcon 5 echo you have the first move echo how many icmb's would you like to fire 1~5 set /p num= if %num%==1 (goto one ) if %num%==2 (goto two ) if %num%==3 (goto three ) if %num%==4 (goto four ) if %num%==5 (goto five ) :one cls echo icbm fired at New Yourk City                            America defcon 4 echo estimated time untill  impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto america 2 :two    cls                              echo two icbm's fired at New York City New York and Los angles Califorina                  echo time untill impact 30 seconds                                       America defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto america2 :three cls echo three icbm's fired at New York City New York and Losangles Califorina and Seatle Washington echo time untill impact 30 seconds                                        America defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto america2 :four cls echo four icbm's fired at New York City New York and Losangles Califorina and Seatle Washington and Pitsburg Penslevania echo time untill impact 30 seconds                                America defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto america2 :five cls echo five icbm's fired at New York City New York and Losangles Califorina and Seatle Washington and Pitsburg Penslevania and Boston Masetucetts echo time untill impact 30 seconds                             America defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto america2 :america2 cls echo %name% you have another move                      America - defcon 4 echo. echo how many icmb's would you like to fire 1~2 set /p num= if %num%==1 (goto one1 ) if %num%==2 (goto two1 ) :one1 cls echo one icbm fired at Washington D.C. echo time untill impact 30 seconds                       America - defcon 3 ping localhost -n 4 >Nul cls echo impact pause goto america3 :two1 cls echo two icbm's fired at Washington D.C. and Miami Florida      echo  time untill impact 30 seconds          America - defcon 3 ping localhost -n 4 > Nul echo impact pause goto america3 :america3 cls echo %name% you have another turn echo i can not fire untill i reach defcon1 echo. echo you may now fire a icbm or a nuclear war head echo 1-icbm  2-nuclear war head set /p wepon= if not defined wepon ( goto please ) if %wepon%==1 (goto icbm ) if %wepon%==2 ( goto nuc ) :icbm cls echo one icbm fired at  the Smithsonian archive bunker echo time untill impact 30 seconds                    America - defcon 2 cls ping localhost -n 4 > Nul echo impact pause goto defcon1 :nuc cls echo one nuclear war head fired at the US Capital          America - defcon 2 echo time untill impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto defcon1 :defcon1 cls echo. echo America totlaly devestated echo. echo America - defcon 1 echo. echo time untill impact 30 seconds echo. echo you may wait untill impact or fire your remaning war heads echo    wait               fire set /p desion= if not defined desion (goto please ) if %desion%==wait (goto Russiawait ) if %desion%==fire ( goto Russiafire ) :Russiawait cls echo time untill impact of american icbm's 10 seconds ping localhost -n 4 > Nul cls echo impact echo all remaning defences destroyed echo total devestation is imenent pause goto end :Russsiafire cls echo remaning misles fired echo time untill impact 30 seconds ping localhost -n 4 > Nul echo impact pause goto Russiawait :end cls echo. echo *--------------------------------------------------------------* echo      GAME OVER echo *--------------------------------------------------------------* echo. echo game results echo. echo AMERICA - LOSE echo. echo RUSSIA - LOSE echo. echo total result NO WINNER echo. echo an interisting game, echo the only way to win is not to play. echo. pause goto top2 :top2 cls echo would you like to play again? echo. set /p gameagain= if not defined gameagain (goto please ) if %gameagain% EQU yes (goto top ) if %gameagain% NEQ yes (goto exit ) :russia cls echo %name% you are fighting for america                    echo.                    Russia - defcon 5 echo you have the first move echo how many icmb's would you like to fire 1~5 set /p num= if %num%==1 (goto one1 ) if %num%==2 (goto two2 ) if %num%==3 (goto three3 ) if %num%==4 (goto four4 ) if %num%==5 (goto five5 ) :one1 cls echo icbm fired at Moscow                       Russia - defcon 4 echo estimated time untill  impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto russia 2 :two2    cls                              echo two icbm's fired at Minsk and Moscow          echo time untill impact 30 seconds                                    Russia - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2 :three3 cls echo three icbm's fired at Minsk and Moscow and Leningrad echo time untill impact 30 seconds                                        America - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2 :four4 cls echo four icbm's fired at Minsk and Moscow and Leningrad and Kiev echo time untill impact 30 seconds                                America - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2 :five5 cls echo five icbm's fired at Minsk and Moscow and Leningrad and Kiev and Tashkent echo time untill impact 30 seconds                            Russia -  defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2 :russia2 cls echo %name% you have another move                      Russia - defcon 4 echo. echo how many icmb's would you like to fire 1~2 set /p num= if %num%==1 (goto one11 ) if %num%==2 (goto two11 ) :one11 cls echo one icbm fired at Baku   echo time untill impact 30 seconds                       Russia - defcon 3 ping localhost -n 4 >Nul cls echo impact pause goto russia3 :two11 cls echo two icbm's fired at  Baku and Kharkov echo  time untill impact 30 seconds         Russia - defcon 3 ping localhost -n 4 > Nul echo impact pause goto russia3 :russia3 cls echo %name% you have another turn echo i can not fire untill i reach defcon1 echo. echo you may now fire a icbm or a nuclear war head echo 1-icbm  2-nuclear war head set /p wepon1= if not defined wepon1 ( goto please ) if %wepon1%==1 (goto icbm1 ) if %wepon1%==2 ( goto nuc1 ) :icbm1 cls echo one icbm fired at  Gorki echo time untill impact 30 seconds                    Russia - defcon 2 cls ping localhost -n 4 > Nul echo impact pause goto defcon1r :nuc1 cls echo one nuclear war head fired at Novosibrisk         Russia - defcon 2 echo time untill impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto defcon1r :defcon1r cls echo. echo Russia totlaly devestated echo. echo Russia - defcon 1 echo. echo time untill impact 30 seconds echo. echo you may wait untill impact or fire your remaning war heads echo    wait               fire set /p desion1= if not defined desion1(goto please ) if %desion1%==wait (goto Americawait ) if %desion1%==fire ( goto Americafire ) :Americawait cls echo 30 seconds untill Russian icbm impact ping localhost -n 4 > Nul echo impact pause goto end :Americafire cls echo all remanig icbm's fired at Russian states echo time untill impact 30 seconds ping localhost -n 4 > Nul cls goto Americawait exit :russialoser cls echo welcome mythbatcer you are fighting for america                    echo.                    Russia - defcon 5 echo you have the first move echo how many icmb's would you like to fire 1~5 set /p num= if %num%==1 (goto one11 ) if %num%==2 (goto two21 ) if %num%==3 (goto three31 ) if %num%==4 (goto four41 ) if %num%==5 (goto five51 ) :one11 cls echo icbm fired at Moscow                       Russia - defcon 4 echo estimated time untill  impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto russia 2m :two21   cls                              echo two icbm's fired at Minsk and Moscow          echo time untill impact 30 seconds                                    Russia - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2m :three31 cls echo three icbm's fired at Minsk and Moscow and Leningrad echo time untill impact 30 seconds                          America - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2m :four41 cls echo four icbm's fired at Minsk and Moscow and Leningrad and Kiev echo time untill impact 30 seconds                                America - defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2m :five51 cls echo five icbm's fired at Minsk and Moscow and Leningrad and Kiev and Tashkent echo time untill impact 30 seconds                            Russia -  defcon 4 ping localhost -n 4 > Nul cls echo impact pause goto russia2m :russia2m cls echo %name% you have another move                      Russia - defcon 4 echo. echo how many icmb's would you like to fire 1~2 set /p num= if %num%==1 (goto one111 ) if %num%==2 (goto two111 ) :one111 cls echo one icbm fired at Baku   echo time untill impact 30 seconds                       Russia - defcon 3 ping localhost -n 4 >Nul cls echo impact pause goto russia3m :two111 cls echo two icbm's fired at  Baku and Kharkov echo  time untill impact 30 seconds         Russia - defcon 3 ping localhost -n 4 > Nul echo impact pause goto russia3m :russia3m cls echo %name% you have another turn echo i can not fire untill i reach defcon1 echo. echo you may now fire a icbm or a nuclear war head echo 1-icbm  2-nuclear war head set /p wepon11= if not defined wepon11 (goto please ) if %wepon11%==1 (goto explosionboom ) if %wepon11%==2 (goto explosion ) :explosionboom cls echo one icbm fired at  Gorki echo time untill impact 30 seconds                    Russia - defcon 2 ping localhost -n 4 > Nul echo impact pause goto defcon1m :explosion cls echo one nuclear war head fired at Novosibrisk         Russia - defcon 2 echo time untill impact 30 seconds ping localhost -n 4 > Nul cls echo impact pause goto defcon1m :defcon1m cls echo. echo Russia totlaly devestated echo. echo Russia - defcon 1 echo. echo time untill impact 30 seconds echo. echo you may wait untill impact or fire your remaning war heads echo    wait               fire set /p desion11= if not defined desion11(goto please ) if %desion11%==wait (goto waitforboom ) if %desion11%==fire ( goto firethosebooms ) :waitforboom cls echo 30 seconds untill Russian icbm impact ping localhost -n 4 > Nul echo impact pause goto ENDM :firthosebooms cls echo all remanig icbm's fired at Russian states echo time untill impact 30 seconds ping localhost -n 4 > Nul cls goto wait22 :endm cls echo. echo American scientest have descoverd the [x-wav] lazar echo this lazar can fit into a small simple packege and emitts no radiation echo The [x-wav] lazar can burn an area of sixty thousand miles across echo in under an  hour echo We have assembled an army of U-2 Dragon ladies outfitted with this revolutionary technology echo We will strik on your command echo. echo type strik to fire the  [x-wav]. This is our finest hour, America lies in your hands now echo good luck %name% echo. set /p command= if not defined command (goto please ) if %command% EQU strik (goto imposoble ) if %command%==wait (goto end ) if %command%==fire (goto imposoble ) :please1 cls echo incorrect responce pause goto endm :imposoble cls echo [X-WAV] SUCCESFUL echo You have won!!!!!!!!!!!! echo. echo *--------------------------------------------------------------* echo      GAME OVER         CONGRADULATIONS echo *--------------------------------------------------------------* echo. echo game results echo. echo AMERICA - !!!!!WIN!!!!! echo. echo RUSSIA - LOSE echo. echo total result YOU ARE THE WINNER echo. echo an interisting game, echo the only way to win is not to play. echo. echo or is it echo. echo yu have unlocked a "secret" echo in TBMS V3.0 type secret in the main menu echo somthing interesting migh happen echo. pause goto top2  

Topic by Laserman595   |  last reply


firefox won't load google or yahoo?

I type google.com and all other ways still wont load google or yahoo i try the search built in nothing. i have tried many ways i cannot ping google in command prompt. is this firewall related?

Question by miiwii3   |  last reply


Does anybody have any suggestions for something to use as an LED diffuser?

Needs to be bigger than a ping pong ball (ideally would be around 3-4 times the size) , but still be v.cheap and light.... as I have a lot of individual leds to diffuse for a display... cheers.

Question by davivid   |  last reply


Im will create the 4wdrobot with lcd that show the obstacle and the distance cm help please the code?

/* 2011-10-03 robot4wd_06.pde Eric Pavey - www.akeric.com This software is released to the wild, free to be used and modified. If you use it, I just ask for some credit ;) Program to drive the 4wd robot chasis using an arduino paired up with a ping))) sensor and a servo for collision detection. Hardware: Arduino Duemilanove (but I'm sure any others will work) http://www.arduino.cc/en/Main/ArduinoBoardDuemilanove Arduino is powered off a 5xAA producing 7.5v, sitting in the belly of the chassis. Main chassis is the "4wd mobile platform" from DF Robot http://www.dfrobot.com/index.php?route=product/product&path=37&product_id=97 http://www.makershed.com/ProductDetails.asp?ProductCode=MKSEEED8 http://www.rugcommunity.org/page/dfrobot-4wd-arduino-mobile Motor control using the Adafruit motorshield: http://www.ladyada.net/make/mshield/index.html There doesn't seem to be API docs, but there is this header file: https://github.com/adafruit/Adafruit-Motor-Shield-library/blob/master/AFMotor.h Motor shield is powered off 4xC batteries (6v). Paralax ping))) : http://www.parallax.com/tabid/768/ProductID/92/Default.aspx http://www.arduino.cc/en/Tutorial/Ping Notes: I had to rewire the ribon connecting the ping to the motorshield: The ping's ribon is ground\+5v\signal, but the motorshield's input pins order are +5v\ground\signal. It works from 2cm to 3m. Paralax (Fubata) "standard servo": This is found in the "PING))) Mounting Bracket Kit": http://www.parallax.com/Store/Robots/RoboticAccessories/tabid/145/CategoryID/22/List/0/SortField/0/Level/a/ProductID/248/Default.aspx This is plugged into the 'servo2' port on the motorshield. It uses the servo library: http://arduino.cc/en/Reference/Servo Much of the ping code at the bottom is taken straight from the Arduino examples. */ //-------------------------------------------------------------------------- // Library include stuff: #include // needed for the motorshield. #include // motorshield needs this for running servos. #include LiquidCrystal lcd(3, 4, 5, 6, 11, 12); //-------------------------------------------------------------------------- // globals: // ping))) stuff: int g_pingPin = 19; // this is actually analog pin 5, pretending to be digital, on the motorshield. long g_collideDist = 50; // in cm, how far before collision mode kicks in? long g_cm = 300; // the current ping reading, just ana initial default. boolean g_checkLeft = false; // used for collision detection boolean g_checkRight = false; // used for collision detection boolean g_checkCenter = false; // used for collision detection int g_leftDist = 0; // used for collision detection int g_rightDist = 0; // used for collision detection // motor stuff: AF_DCMotor g_motor1(1, MOTOR12_8KHZ); // back left AF_DCMotor g_motor2(2, MOTOR12_8KHZ); // back right AF_DCMotor g_motor3(3, MOTOR12_8KHZ); // front right AF_DCMotor g_motor4(4, MOTOR12_8KHZ); // front left byte g_motorSpeed = 255; // max is 255 // Mode (state) stuff: byte g_mode = 1; // 1 = drive, 2 = proximity check, 3 = turning byte g_driveDir = -1; // 0 = stop, 1 = straight, 2 = right, 3 = left // servo stuff: Servo g_servo2; int g_servo2pin = 9; // servo2 uses digital pin 9, even though the docs say pin 10... int g_servoCenter = 98; // in degrees. 98 is straight ahead based on how I mounted the servo (it must be // a little inaccurate). full left is 180, full right is 0. // Servo is flipped upside down, fyi int g_servoRight = 135; // how far right? Max is 180, full right. int g_servoLeft = 45; // how far left? Min is 0, full left. // time stuff unsigned long g_time; // global time tracker unsigned long g_ptime; // global previous time tracker unsigned long g_elapsed = 0; // helps keeping track of framerate. unsigned long g_interval = 33; // in ms (about 30fps). This slows down the processing allowing the // multiple systems to play nicely together. Make this number smaller and it won't have enough // time for each state to run properly: The servo won't do a full sweep when scanning. unsigned long g_turnlength = 750; // in ms, how long to turn for. Since we don't know how far // it turns, we just guess on how long it should. The type of terrain turing on has a great // effect on what this should be. This value works well for my hardwood floors. unsigned long g_turnUntil; // used to track how long to turn. //-------------------------------------------------------------------------- // setup \ loop : void setup() { // Attach & center the servo: g_servo2.attach(g_servo2pin); g_servo2.write(g_servoCenter); // center it by default // Setup our framerate stuff g_time = millis(); g_ptime = g_time; } void loop() { // Main program entry point. // Need to keep the aiming and the piging at a fixed rate, or the closer the object gets // to the ping the faster it will aim, and do bad stuff. g_ptime = g_time; g_time = millis(); g_elapsed += g_time - g_ptime; // Wait for the proper amount of time to pass before we do anything: if(g_elapsed < g_interval){ return; } else{ g_elapsed = 0; } // Do stuff, based on the current mode: if(g_mode == 1){ g_cm = ping(); // sometimes the sensor returns a 0 value that can foul up things :( if(g_cm > g_collideDist || g_cm == 0){ // If there is nothing in our way, drive! if(g_driveDir != 1){ g_driveDir = 1; move(g_driveDir); } } else{ // if we're too close to something, stop the motors and switch to 'proximity check' mode: if(g_driveDir != 0){ g_driveDir = 0; move(g_driveDir); } // initialize the proximity check stuff: g_checkLeft = false; g_checkRight = false; g_checkCenter = false; g_leftDist = 0; g_rightDist = 0; // switch to mode 2: g_mode = 2; } } else if(g_mode == 2){ // Do proximity check! boolean checked = proximityCheck(); if(checked){ // Define which direction to turn. // If the right distance is greater than the left distance, turn that direction, // otherwise go the other way: if(g_rightDist >= g_leftDist){ g_driveDir = 2; } else{ g_driveDir = 3; } // now that we've set which direction to turn, start timing how long the turn // has taken, and switch to mode 3. g_turnUntil = millis() + g_turnlength; g_mode = 3; } } else if(g_mode == 3){ // We must be turning! The logic for switching to other modes is in that function. turn(); } } //-------------------------------------------------------------------------- // Helper functions: void turn(){ // Executed when g_mode == 3 // Used to turn the robot. if (millis() < g_turnUntil){ // keep'on turning... move(g_driveDir); } else{ // If we're done turning, see if there is anything still in our way: g_cm = ping(); // sometimes the sensor returns a 0 value that can foul up things :( if(g_cm > g_collideDist || g_cm == 0){ // If there is nothing in our way go back to mode 1: g_mode = 1; } else{ // If stuff is still in our way, turn more in the same direction until // not blocked: g_turnUntil = millis() + g_turnlength; } } } boolean proximityCheck(){ // Used when mode == 2: Swing the ping left and right taking readings to // find which way is safe to go. Returns false when in the middle of the check // operation, returns true when entire check process is complete. // Current angle of the servo: float angle = g_servo2.read(); // check left first: ( full left is 0 deg) if(g_checkLeft == false){ if(angle > g_servoLeft){ g_servo2.write(angle-10) ; return false; } else{ g_checkLeft = true; g_leftDist = ping(); return false; } } // check right second: ( full right is 180 deg) if(g_checkLeft == true && g_checkRight == false){ if(angle < g_servoRight){ g_servo2.write(angle+10) ; return false; } else{ g_checkRight = true; g_rightDist = ping(); return false; } } // Go to center position third: if(g_checkLeft == true && g_checkRight == true && g_checkCenter == false){ if(angle != g_servoCenter){ g_servo2.write(angle-10) ; return false; } else{ g_checkCenter = true; return false; } } // Finally if we've checked left, right, and got back to center, return true // to tell the later code that the full check is complete: if(g_checkLeft == true && g_checkRight == true && g_checkCenter == true){ return true; } else{ return false; } } void move(byte mode){ // This function moves the wheels. Can be called to when mode == 1 (driving) or 3 (turning). if(mode == 0){ // all stop! g_motor1.setSpeed(0); g_motor2.setSpeed(0); g_motor3.setSpeed(0); g_motor4.setSpeed(0); } else{ // full speed! g_motor1.setSpeed(g_motorSpeed); g_motor2.setSpeed(g_motorSpeed); g_motor3.setSpeed(g_motorSpeed); g_motor4.setSpeed(g_motorSpeed); // full speed, but which direction? if(mode == 1){ // go straight g_motor1.run(FORWARD); g_motor2.run(FORWARD); g_motor3.run(FORWARD); g_motor4.run(FORWARD); } else if(mode == 2){ // turn right g_motor1.run(FORWARD); g_motor2.run(BACKWARD); g_motor3.run(BACKWARD); g_motor4.run(FORWARD); } else if (mode == 3){ // turn left g_motor1.run(BACKWARD); g_motor2.run(FORWARD); g_motor3.run(FORWARD); g_motor4.run(BACKWARD); } } } float ping(){ // Returns the distance in cm from the ping sensor. Pulled from // Arduino docs. // The PING))) is triggered by a HIGH pulse of 2 or more microseconds. // Give a short LOW pulse beforehand to ensure a clean HIGH pulse: pinMode(g_pingPin, OUTPUT); digitalWrite(g_pingPin, LOW); delayMicroseconds(2); digitalWrite(g_pingPin, HIGH); delayMicroseconds(5); digitalWrite(g_pingPin, LOW); // The same pin is used to read the signal from the PING))): a HIGH // pulse whose duration is the time (in microseconds) from the sending // of the ping to the reception of its echo off of an object. pinMode(g_pingPin, INPUT); long duration = pulseIn(g_pingPin, HIGH); float cm = microsecondsToCentimeters(duration); return cm; } long microsecondsToCentimeters(long microseconds){ // Simple conversion setp, kept as a function simply to illustrate // how it works. Pulled from Arduino docs. // The speed of sound is 340 m/s or 29 microseconds per centimeter. // The ping travels out and back, so to find the distance of the // object we take half of the distance travelled. //return microseconds / 29 / 2; return microseconds / 58; } // while(val == HIGH) { // Loop until pin reads a high value //val = digitalRead(ultraSoundSignal); //timecount = timecount +1; // Count echo pulse time} //ultrasoundValue = timecount; // Append echo pulse time to ultrasoundValue //lcd.clear(); //lcd.setCursor(0,0); //lcd.print("OBSTAKEL cm "); //lcd.print(timecount/10); //delay(200); //if(timecount > 0){ //digitalWrite(ledPin, HIGH);}

Question by pe2hlc   |  last reply