Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 7 of 7

Thread: Second keyboard/mouse for a machine I built running Mach 3 on Win 7

Threaded View

  1. #1
    Junior Member
    Join Date
    Dec 2017

    Second keyboard/mouse for a machine I built running Mach 3 on Win 7

    I have three known locations on a display monitor (Mach3 CNC controller) that I want to be able to press a button at a different location than that of the display, keyboard and mouse to indicate that I want the action at that location to be acted upon. Two of these actions are to set the Mach 3 controllers axis position to zero. The third will be to tell the controller to test for the Z axis zero position which will run a script macro to accomplish that.
    These are pretty straight forward mouse move to absolute positions and right click once there. Although, I am not sure about absolute positioning of the mouse as somewhere I read that the mouse movements were all relative to its current position.
    That requires 3 momentary inputs.
    The final need is to again operate momentary inputs (6) to output the following keyboard characters:
    All of these key presses may be momentary or repeated by holding down the switch, their purpose is to cause the movement of an axis as needed for fine positioning.
    This box will be a second keyboard/mouse with these functions. I purchased the Teensy 3.2 to accomplish this task and researched the different possible libraries. I am new to this and have not done any significant engineering or even programming in maybe 30 years, so am at a loss as to exactly what some things mean. I read that Paul redid the library for the 3.2 from the 2.0. I downloaded the Teensyduino libraries and installed them, but cannot find the USB_Keyboard library to include. I think I am just confused due to my lack of experience.
    If someone could point me in the right direction, I would very much appreciate the assistance.

    I used a numeric keypad recently on the machine (I built the CNC machine from plans) and it had some drawbacks, one was it seemed that the num lock would always be the opposite the main keypad on the keyboard and I always had to push it and when I returned to the main keyboard, I had to push it as well. I am not going to use num lock, instead input those keypresses as indicated above. Should eliminate that problem, I hope. Secondly, the keypad did not have the additional 3 abilities as indicated in the first paragraph of mouse moves and right clicks.
    Lastly, as a 70-year-old geezer, it is a new challenge that will be a joy to complete.
    Thank you,

    woodcrafterClick image for larger version. 

Name:	USB Logic for Direction Control and Axis  Zeroing - Page 1.jpg 
Views:	17 
Size:	90.1 KB 
ID:	12440
    Last edited by woodcrafter; 01-02-2018 at 01:59 AM. Reason: add a flowchart of what I think the logic should be.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts