woodcrafter
Member
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:
KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT, KEY_PAGEUP, KEY_PAGEDOWN.
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,
woodcrafter
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:
KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT, KEY_PAGEUP, KEY_PAGEDOWN.
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,
woodcrafter
Last edited: