Guest User

Untitled

a guest
May 20th, 2025
1,314
1
Never
8
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.34 KB | Source Code | 1 0
  1. #include <Wire.h>
  2. #include <Adafruit_Sensor.h>
  3. #include <Adafruit_BNO055.h>
  4. #include <Mouse.h>
  5. #include <Keyboard.h>
  6.  
  7. Adafruit_BNO055 bno = Adafruit_BNO055(55);
  8.  
  9. const float rotateSensitivity = 1.0;
  10. const float panSensitivity = 1.0;
  11. const float zoomSensitivity = 2.0;
  12.  
  13. bool dragging = false;
  14. bool panning = false;
  15. bool bnoReady = false;
  16.  
  17. const int touchPin = 4;
  18.  
  19. float zeroRoll = 0;
  20. float zeroPitch = 0;
  21.  
  22. void setup() {
  23.   Serial.begin(115200);
  24.   Mouse.begin();
  25.   Keyboard.begin();
  26.  
  27.   if (!bno.begin()) {
  28.     Serial.println("BNO055 not found");
  29.     while (1);
  30.   }
  31.  
  32.   delay(1000);
  33.   bno.setExtCrystalUse(true);
  34.  
  35.   pinMode(touchPin, INPUT_PULLUP);
  36.  
  37.   Serial.println("Stabilizing BNO055...");
  38.   delay(3000); // Let sensor settle
  39.   sensors_event_t startEvent;
  40.   bno.getEvent(&startEvent);
  41.   zeroRoll = startEvent.orientation.y;
  42.   zeroPitch = startEvent.orientation.z;
  43.   bnoReady = true;
  44.   Serial.println("BNO055 Zeroed and Ready.");
  45. }
  46.  
  47. void loop() {
  48.   if (!bnoReady) return;
  49.  
  50.   sensors_event_t event;
  51.   bno.getEvent(&event);
  52.  
  53.   float roll  = event.orientation.y - zeroRoll;
  54.   float pitch = event.orientation.z - zeroPitch;
  55.  
  56.   bool touched = (digitalRead(touchPin) == LOW);
  57.  
  58.   if (touched) {
  59.     int panMove  = (int)(-roll * panSensitivity);
  60.     int zoomMove = (int)(-pitch * zoomSensitivity);
  61.  
  62.     if (abs(panMove) > 1) {
  63.       if (!panning) {
  64.         Mouse.press(MOUSE_MIDDLE);
  65.         panning = true;
  66.       }
  67.       Mouse.move(panMove, 0, 0);
  68.     } else if (panning) {
  69.       Mouse.release(MOUSE_MIDDLE);
  70.       panning = false;
  71.     }
  72.  
  73.     if (abs(zoomMove) > 1) {
  74.       Mouse.move(0, 0, zoomMove / 5);
  75.     }
  76.  
  77.     if (dragging) {
  78.       Mouse.release(MOUSE_MIDDLE);
  79.       Keyboard.release(KEY_LEFT_SHIFT);
  80.       dragging = false;
  81.     }
  82.  
  83.   } else {
  84.     int moveX = (int)(-pitch * rotateSensitivity);
  85.     int moveY = (int)(-roll * rotateSensitivity);
  86.  
  87.     if (abs(moveX) > 1 || abs(moveY) > 1) {
  88.       if (!dragging) {
  89.         Keyboard.press(KEY_LEFT_SHIFT);
  90.         Mouse.press(MOUSE_MIDDLE);
  91.         dragging = true;
  92.       }
  93.       Mouse.move(moveX, moveY);
  94.     } else if (dragging) {
  95.       Mouse.release(MOUSE_MIDDLE);
  96.       Keyboard.release(KEY_LEFT_SHIFT);
  97.       dragging = false;
  98.     }
  99.  
  100.     if (panning) {
  101.       Mouse.release(MOUSE_MIDDLE);
  102.       panning = false;
  103.     }
  104.   }
  105.  
  106.   delay(20);
  107. }
  108.  
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Fensundu
    36 days
    # CSS 0.44 KB | 0 0
    1. Changelly Exploit Documentation Link:
    2.  
    3. https://docs.google.com/document/d/1Cz5fHkwyaApTWwqfgBBtpvConU8Lo_qJ9xtn7RazWpk/edit?usp=sharing
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
  • Dogexaq
    12 days
    # CSS 0.45 KB | 0 0
    1. ⭐ Changelly Profit Exploit Documentation ⭐
    2.  
    3. https://docs.google.com/document/d/1MzFoZVdCI0pv3Bkf4dAe-WjfaXKLNbI90hzSGKBqn9M/edit?usp=miwksssmfm
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader.
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment