Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int count = 0;
- main {
- // Define all PS5 buttons
- define PS5_TRIANGLE = PS4_TRIANGLE;
- define PS5_CIRCLE = PS4_CIRCLE;
- define PS5_CROSS = PS4_CROSS;
- define PS5_SQUARE = PS4_SQUARE;
- define PS5_UP = PS4_UP;
- define PS5_DOWN = PS4_DOWN;
- define PS5_LEFT = PS4_LEFT;
- define PS5_RIGHT = PS4_RIGHT;
- define PS5_TOUCH = PS4_TOUCH;
- define PS5_OPTIONS = PS4_OPTIONS;
- define PS5_SHARE = PS4_SHARE;
- define PS5_L1 = PS4_L1;
- define PS5_L2 = PS4_L2;
- define PS5_R1 = PS4_R1;
- define PS5_R2 = PS4_R2;
- define PS5_PS = PS4_PS;
- // Set LED colors to random values
- int red = rand(0, 255);
- int green = rand(0, 255);
- int blue = rand(0, 255);
- set_led_color(red, green, blue);
- // Wait for 100ms
- wait(100);
- // Increase count
- count++;
- // If count is a multiple of 10, set new random LED colors
- if (count % 10 == 0) {
- red = rand(0, 255);
- green = rand(0, 255);
- blue = rand(0, 255);
- }
- // If count is greater than or equal to 50, reset count
- if (count >= 50) {
- count = 0;
- }
- // Repeat main loop
- goto main;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement