Jump to content

[Version 1] Phukducky

Recommended Posts

heres my phukducky.. designed to be modular, and capable of doing a lot.

hopefully easy code to read

if you create any modules/snipits or have inprovements please chuck me an email

I will hopefully be updating this soon,

literally got my teensy 12 hrs ago and made this

also soldered on a dip switch to pins 14 - 21 (analog)

this will perform 1 module at a time but capable of doing up to 128 :S .. early.. math bad

if you have any questions, please post them below

void setup() {  
   pinMode(11, OUTPUT);  
   pinMode(14, INPUT_PULLUP);   // Dip - debug switch
   pinMode(15, INPUT_PULLUP);   // Dip  
   pinMode(16, INPUT_PULLUP);   // Dip  
   pinMode(17, INPUT_PULLUP);   // Dip  
   pinMode(18, INPUT_PULLUP);   // Dip  
   pinMode(19, INPUT_PULLUP);   // Dip  
   pinMode(20, INPUT_PULLUP);   // Dip  
   pinMode(21, INPUT_PULLUP);   // Dip
void loop(){  

int pin_struct[] = { 0, 200, 64, 32, 16, 8, 4, 2, 1 };
int multiplier = 0;
int binary = 0;
char* description[500];

description[0] = "\r-----end-----\r"
 "Phukducky 1.0 By NanoyMaster\r"
 "For help/support/documentation Please visit http://www.nanoy.org\r"
 "Designed to be Modular and Easy.\r"
 "Feel free to email nanoymaster[at]gmail[dot]com";
description[1] = "CrazyMouse - moves and clicks mouse randomly\r";
description[2] = "end"; // need to keep the last one as "end" 

   for(int thispin=14; thispin < 22;thispin++){ // get the binary value (including debug bit)
         digitalWrite(ledPin, HIGH);
         multiplier = thispin - 13;
         binary = binary + (1 * pin_struct[multiplier]);
   if(binary >= 200 ){ // if debuging enabled then run debug
      Keyboard.print("\rDIP Binary = "); Keyboard.print(binary - 200); 
         for(int debugno=1; debugno <=129; debugno++){
            if(description[debugno] != "end"){
               Keyboard.print(debugno); Keyboard.print(") ");
// main program functions go here

   if(binary == 1){
      Mouse.move(random(-100, 100) ,random(-100, 100) );

// end main functions 

void die(){ // failsafe... if you need to exit the main loop, or just want to run once
      digitalWrite(ledPin, LOW); 
      digitalWrite(ledPin, HIGH); 

as you can see you just have to add modules under main functions and add the description in the descriptions section.

Edited by NanoyMaster
Link to comment
Share on other sites

--space for updates--

Your lucky you havn't been warned for this, as this is spamming, if you need more space, just edit you first post.

The descriptions are just a waste of space as far as I can tell, just use comments.

Link to comment
Share on other sites

not quite the feedback I was expecting. but I'll roll with it.

if you know how I can delete them I will, but I can't find the "delete post" button

and as for the descriptions. if you've got your stick "in the feild" you can just set the debug switch, check what you want to run and go for it, without having to remember all the modules/snippits you have added in

if you don't want to add them then don't, just set description[1] = "end";

and leave them out

Edited by NanoyMaster
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...