Skip to content

Commit

Permalink
variables added
Browse files Browse the repository at this point in the history
variables instead of nonsense numbers!
  • Loading branch information
tornado67 authored Apr 13, 2023
1 parent d04e62c commit d136578
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,32 +1,37 @@
#include <Arduino.h>
#include <BleMouse.h>
#define MINUTE 60000
#define X_RANDOM_RANGE 3
#define Y_RANDOM_RANGE 3

BleMouse bleMouse("DroChill Mouse Jiggler v1");

BleMouse bleMouse("DroChill mouse jiggler v1");

int move_interval = 12; // with lower interval notify(): << esp_ble_gatts_send_ notify: rc=-1 Unknown ESP_ERR error appears
int loop_interval = MINUTE * 1;
uint16_t min_distance, max_distance;

void setup()
{
bleMouse.begin();
min_distance = 30;
max_distance = 600;
bleMouse.begin();
}

void loop()
{

int distance = random(10, 600);
int x = random(3) - 1;
int y = random(3) - 1;
for (int i = 0; i < distance; i++) {

int distance = random(min_distance, max_distance);
int x = random(X_RANDOM_RANGE) - 1;
int y = random(Y_RANDOM_RANGE) - 1;

for (int i = 0; i < distance; i++)
{
bleMouse.move(x, y, 0);
delay(move_interval);

}
if (random(0,7) == 3 )
bleMouse.click(MOUSE_RIGHT);

if (random(0, 7) == 3)
bleMouse.click(MOUSE_RIGHT);

delay(loop_interval);
}

0 comments on commit d136578

Please sign in to comment.