HELP WITH COCK TORMENTOR SKETCH PLEASE

Selfbondage software and other kinky developments

Moderators: Riddle, Shannon SteelSlave

Post Reply
perfectslave1968
*
Posts: 8
Joined: 26 May 2015, 02:23

HELP WITH COCK TORMENTOR SKETCH PLEASE

Post by perfectslave1968 »

Hi everyone!
Some years ago I found the COCK TORMENTOR sketch (https://www.xeromag.com/sextech-tormentor.html) and I had some fun with that :D :D :D , now I would like to add a button to use when i'm on the edge, what I would like is:
button off: tormentor run
button on: a delay at random time
if someone can help here the COCK TORMENTOR SKETCH
Thanks!

/*
Evil begins here
*/


int sexPin = 15; // Sex toy connected to pin
int ledpin = 6;

unsigned long randNum;
int randIntensity;
int randPattern;
int maxPattern = 9; // highest pattern number

void setup() {
randomSeed(analogRead(0));
pinMode(ledpin, OUTPUT);
pinMode (sexPin, OUTPUT);
Serial.begin(9600);
}

void loop() {

analogWrite (sexPin, 0); //Turn off toy

digitalWrite(ledpin, HIGH); //Turn off internal & external LED
randNum = random (1500,9000)*5; // Get a random number
Serial.print("Delaying: ");
Serial.println(randNum); //Debugging
delay (randNum);

randPattern=random(maxPattern)+1;
Serial.print("Pattern number: ");
Serial.println(randPattern); //Debugging

switch(randPattern) {

case 1:
// Run at random intensity for 10-45 seconds
randNum = random(1000,4500) * 10;
randIntensity = random (100,255)+1;
analogWrite (sexPin,randIntensity);
digitalWrite(ledpin, LOW);

break;

case 2:
// oh eh oh eh oh
analogWrite (sexPin, 127);
digitalWrite(ledpin, LOW);

delay (1000);
analogWrite (sexPin, 255);
digitalWrite(ledpin, LOW);

delay (1600);
analogWrite (sexPin, 127);
digitalWrite(ledpin, LOW);

delay (1000);
analogWrite (sexPin, 255);
digitalWrite(ledpin, LOW);

delay (1600);
analogWrite (sexPin, 127);
digitalWrite(ledpin, LOW);

delay (1000);
break;

case 3:
// bzz bzz (bzz) bzzzzzzzzzz
randNum=random(1,3)+1;
for (int i=0; i <= randNum; i++){
analogWrite (sexPin, 255);
digitalWrite(ledpin, LOW);

delay(300);
analogWrite (sexPin, 0);
digitalWrite(ledpin, HIGH);

delay(150);
}
randNum=random(2000,12000);
analogWrite(sexPin,255);
digitalWrite(ledpin, LOW);

delay(randNum);
break;

case 4:
// bzz bzz bzzzzzzzz bzz bzz bzz
analogWrite (sexPin, 127);
digitalWrite(ledpin, LOW);

delay(500);
analogWrite (sexPin, 0);
digitalWrite(ledpin, HIGH);

delay(100);
analogWrite (sexPin, 190);
digitalWrite(ledpin, LOW);

delay(500);
analogWrite (sexPin, 0);
digitalWrite(ledpin, HIGH);

delay(100);
randNum=random(2000,12000);
analogWrite(sexPin,255);
digitalWrite(ledpin, LOW);

delay(randNum);
randNum=random(4)+3;
for (int i=0; i <= randNum; i++){
analogWrite (sexPin, 255);
digitalWrite(ledpin, LOW);

delay(300);
analogWrite (sexPin, 0);
digitalWrite(ledpin, HIGH);

delay(150);
}
break;

case 5:
// pulse pulse pulse pulse pulse
randNum=random(8)+3;
for (int i=0; i <= randNum; i++){
randIntensity=random(100,255);
analogWrite (sexPin, randIntensity);
digitalWrite(ledpin, LOW);

delay(300);
analogWrite (sexPin, 0);
digitalWrite(ledpin, HIGH);

delay(150);
}
break;

case 6:
//fade
randNum=random(3000,6000);
digitalWrite(ledpin, LOW);

analogWrite (sexPin, 255);
delay(randNum);
for(int fadeValue = 255 ; fadeValue >= 0; fadeValue -=1) {
// sets the value (range from 0 to 255):
analogWrite(sexPin, fadeValue);
// wait for 30 milliseconds
delay(40);
}
break;

case 7:
//fadefade
randNum=random(1000,3000);
analogWrite (sexPin, 255);
digitalWrite(ledpin, LOW);

delay(randNum);
for(int fadeValue = 255 ; fadeValue >= 100; fadeValue -=1) {
analogWrite(sexPin, fadeValue);
delay(40);
}
for(int fadeValue = 255 ; fadeValue >= 0; fadeValue -=1) {
analogWrite(sexPin, fadeValue);
delay(40);
}
break;

case 8:
//fade up down
randNum=random(1000,4000);
digitalWrite (13,HIGH);
digitalWrite(12, HIGH);
for(int fadeValue = 0 ; fadeValue >= 255; fadeValue +=1) {
analogWrite(sexPin, fadeValue);
delay(40);
}
delay(randNum);
for(int fadeValue = 255 ; fadeValue >= 0; fadeValue -=1) {
analogWrite(sexPin, fadeValue);
delay(40);
}
break;

case 9:
// pulse up
for (int pulses=1 ; pulses <=10; pulses +=1) {
randIntensity=(pulses*20)+55;
analogWrite (sexPin, randIntensity);
digitalWrite(ledpin, LOW);

delay(300);
analogWrite (sexPin, 0);
digitalWrite(ledpin, HIGH);

delay(150);
}
break;

} //end switch
} //end loop
User avatar
kinbaku
*****
Posts: 5047
Joined: 10 Jan 2020, 20:26
Location: Belgium

Re: HELP WITH COCK TORMENTOR SKETCH PLEASE

Post by kinbaku »

I also made my own version of this Tormentor. :D

For your problem you can use an interrupt: take the first example. Note that in the void loop() there should be no period after the digitalWrite(ledPin, state);
If you are using an Arduino Uno R3 you can use the digital pin 2. Just connect the switch to pin 2 and GND. An additional resistor at the switch is not necessary because you use INPUT_PULLUP with pinMode(interruptPin, INPUT_PULLUP) ; so not like the picture of the Diagram which contains errors. You use the internal pull-up resistor of the Arduino, which saves a resistor and a wire in the circuit. Note that this reverses the logic: it goes HIGH when open and LOW when pressed.

The glow() function of the example will then contain the code that you keep on edging with randNum=random(1000,2000)*600; and Delay(randNum); :twisted: (between 10 and 20 minutes).

You'll probably have to create a perpetual While loop after this where the Arduino does nothing to prevent it from going back to the actual main program.
Or you can choose that the main program continues - Just a random delay with nothing when you press the button, then the randNum and Delay(randNum) are the only commands in the glove function.
User avatar
Shannon SteelSlave
Moderator
Posts: 6530
Joined: 03 Feb 2019, 19:49
Location: New England, USA

Re: HELP WITH COCK TORMENTOR SKETCH PLEASE

Post by Shannon SteelSlave »

perfectslave1968 wrote:Evil begins here
Good to meet you, Perfect Slave. Would you like to join our band of programmers? Send me a Private Message if interested.
Bondage is like a foreign film without subtitles. Only through sharing and practice can we hope to understand.
A Jedi uses bondage for knowledge and defense, never for attack.
I am so smart! I am so smart! S-M-R-T!....I, I mean S-M-A-R-T!
👠👠
perfectslave1968
*
Posts: 8
Joined: 26 May 2015, 02:23

Re: HELP WITH COCK TORMENTOR SKETCH PLEASE

Post by perfectslave1968 »

Hi! Thanks for the answer!, unfortunately It didn't work what I've done.....I'm not a programmer and I don't have time to study the case.......I hope that someone could help including the part that I need in the sketch..meanwhile I'll try your tormentor's version....but...does the pattern n°1 work for you? it never worked for me....bye
Thanks!
kinbaku wrote:I also made my own version of this Tormentor. :D

For your problem you can use an interrupt: take the first example. Note that in the void loop() there should be no period after the digitalWrite(ledPin, state);
If you are using an Arduino Uno R3 you can use the digital pin 2. Just connect the switch to pin 2 and GND. An additional resistor at the switch is not necessary because you use INPUT_PULLUP with pinMode(interruptPin, INPUT_PULLUP) ; so not like the picture of the Diagram which contains errors. You use the internal pull-up resistor of the Arduino, which saves a resistor and a wire in the circuit. Note that this reverses the logic: it goes HIGH when open and LOW when pressed.

The glow() function of the example will then contain the code that you keep on edging with randNum=random(1000,2000)*600; and Delay(randNum); :twisted: (between 10 and 20 minutes).

You'll probably have to create a perpetual While loop after this where the Arduino does nothing to prevent it from going back to the actual main program.
Or you can choose that the main program continues - Just a random delay with nothing when you press the button, then the randNum and Delay(randNum) are the only commands in the glove function.
User avatar
kinbaku
*****
Posts: 5047
Joined: 10 Jan 2020, 20:26
Location: Belgium

Re: HELP WITH COCK TORMENTOR SKETCH PLEASE

Post by kinbaku »

perfectslave1968 wrote:[....but...does the pattern n°1 work for you? it never worked for me....bye
Between the digitalWrite(ledpin, LOW); and the break; in case 1 there must be a delay(randNum); instead of the empty line. So you have a delay in the range of 10000-45000 miliseconds = 10-45 seconds.
perfectslave1968
*
Posts: 8
Joined: 26 May 2015, 02:23

Re: HELP WITH COCK TORMENTOR SKETCH PLEASE

Post by perfectslave1968 »

I'll try....Thanks!
Bye
Post Reply